This is /home/cyd/emacs/doc/emacs/../../info/emacs, produced by
makeinfo version 4.13 from /home/cyd/emacs/doc/emacs/emacs.texi.

This is the `GNU Emacs Manual', updated for Emacs version 24.2.

Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.3 or any later version published by the Free Software
     Foundation; with the Invariant Sections being "The GNU Manifesto,"
     "Distribution" and "GNU GENERAL PUBLIC LICENSE," with the
     Front-Cover texts being "A GNU Manual," and with the Back-Cover
     Texts as in (a) below.  A copy of the license is included in the
     section entitled "GNU Free Documentation License."

     (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
     modify this GNU manual.  Buying copies from the FSF supports it in
     developing GNU and promoting software freedom."

INFO-DIR-SECTION Emacs
START-INFO-DIR-ENTRY
* Emacs: (emacs).       The extensible self-documenting text editor.
END-INFO-DIR-ENTRY


File: emacs,  Node: Init Examples,  Next: Terminal Init,  Prev: Init Syntax,  Up: Init File

48.4.2 Init File Examples
-------------------------

Here are some examples of doing certain commonly desired things with
Lisp expressions:

   * Add a directory to the variable `load-path'.  You can then put
     Lisp libraries that are not included with Emacs in this directory,
     and load them with `M-x load-library'.  *Note Lisp Libraries::.

          (add-to-list 'load-path "/path/to/lisp/libraries")

   * Make <TAB> in C mode just insert a tab if point is in the middle
     of a line.

          (setq c-tab-always-indent nil)

     Here we have a variable whose value is normally `t' for `true' and
     the alternative is `nil' for `false'.

   * Make searches case sensitive by default (in all buffers that do not
     override this).

          (setq-default case-fold-search nil)

     This sets the default value, which is effective in all buffers
     that do not have local values for the variable (*note Locals::).
     Setting `case-fold-search' with `setq' affects only the current
     buffer's local value, which is probably not what you want to do in
     an init file.

   * Specify your own email address, if Emacs can't figure it out
     correctly.

          (setq user-mail-address "cheney@torture.gov")

     Various Emacs packages, such as Message mode, consult
     `user-mail-address' when they need to know your email address.
     *Note Mail Headers::.

   * Make Text mode the default mode for new buffers.

          (setq-default major-mode 'text-mode)

     Note that `text-mode' is used because it is the command for
     entering Text mode.  The single-quote before it makes the symbol a
     constant; otherwise, `text-mode' would be treated as a variable
     name.

   * Set up defaults for the Latin-1 character set which supports most
     of the languages of Western Europe.

          (set-language-environment "Latin-1")

   * Turn off Line Number mode, a global minor mode.

          (line-number-mode 0)

   * Turn on Auto Fill mode automatically in Text mode and related modes
     (*note Hooks::).

          (add-hook 'text-mode-hook 'auto-fill-mode)

   * Load the installed Lisp library named `foo' (actually a file
     `foo.elc' or `foo.el' in a standard Emacs directory).

          (load "foo")

     When the argument to `load' is a relative file name, not starting
     with `/' or `~', `load' searches the directories in `load-path'
     (*note Lisp Libraries::).

   * Load the compiled Lisp file `foo.elc' from your home directory.

          (load "~/foo.elc")

     Here a full file name is used, so no searching is done.

   * Tell Emacs to find the definition for the function `myfunction' by
     loading a Lisp library named `mypackage' (i.e. a file
     `mypackage.elc' or `mypackage.el'):

          (autoload 'myfunction "mypackage" "Do what I say." t)

     Here the string `"Do what I say."' is the function's documentation
     string.  You specify it in the `autoload' definition so it will be
     available for help commands even when the package is not loaded.
     The last argument, `t', indicates that this function is
     interactive; that is, it can be invoked interactively by typing
     `M-x myfunction <RET>' or by binding it to a key.  If the function
     is not interactive, omit the `t' or use `nil'.

   * Rebind the key `C-x l' to run the function `make-symbolic-link'
     (*note Init Rebinding::).

          (global-set-key "\C-xl" 'make-symbolic-link)

     or

          (define-key global-map "\C-xl" 'make-symbolic-link)

     Note once again the single-quote used to refer to the symbol
     `make-symbolic-link' instead of its value as a variable.

   * Do the same thing for Lisp mode only.

          (define-key lisp-mode-map "\C-xl" 'make-symbolic-link)

   * Redefine all keys which now run `next-line' in Fundamental mode so
     that they run `forward-line' instead.

          (substitute-key-definition 'next-line 'forward-line
                                     global-map)

   * Make `C-x C-v' undefined.

          (global-unset-key "\C-x\C-v")

     One reason to undefine a key is so that you can make it a prefix.
     Simply defining `C-x C-v ANYTHING' will make `C-x C-v' a prefix,
     but `C-x C-v' must first be freed of its usual non-prefix
     definition.

   * Make `$' have the syntax of punctuation in Text mode.  Note the
     use of a character constant for `$'.

          (modify-syntax-entry ?\$ "." text-mode-syntax-table)

   * Enable the use of the command `narrow-to-region' without
     confirmation.

          (put 'narrow-to-region 'disabled nil)

   * Adjusting the configuration to various platforms and Emacs
     versions.

     Users typically want Emacs to behave the same on all systems, so
     the same init file is right for all platforms.  However, sometimes
     it happens that a function you use for customizing Emacs is not
     available on some platforms or in older Emacs versions.  To deal
     with that situation, put the customization inside a conditional
     that tests whether the function or facility is available, like
     this:

          (if (fboundp 'blink-cursor-mode)
              (blink-cursor-mode 0))

          (if (boundp 'coding-category-utf-8)
              (set-coding-priority '(coding-category-utf-8)))

     You can also simply disregard the errors that occur if the
     function is not defined.

          (condition case ()
              (set-face-background 'region "grey75")
            (error nil))

     A `setq' on a variable which does not exist is generally harmless,
     so those do not need a conditional.


File: emacs,  Node: Terminal Init,  Next: Find Init,  Prev: Init Examples,  Up: Init File

48.4.3 Terminal-specific Initialization
---------------------------------------

Each terminal type can have a Lisp library to be loaded into Emacs when
it is run on that type of terminal.  For a terminal type named
TERMTYPE, the library is called `term/TERMTYPE' and it is found by
searching the directories `load-path' as usual and trying the suffixes
`.elc' and `.el'.  Normally it appears in the subdirectory `term' of
the directory where most Emacs libraries are kept.

   The usual purpose of the terminal-specific library is to map the
escape sequences used by the terminal's function keys onto more
meaningful names, using `input-decode-map' (or `function-key-map'
before it).  See the file `term/lk201.el' for an example of how this is
done.  Many function keys are mapped automatically according to the
information in the Termcap data base; the terminal-specific library
needs to map only the function keys that Termcap does not specify.

   When the terminal type contains a hyphen, only the part of the name
before the first hyphen is significant in choosing the library name.
Thus, terminal types `aaa-48' and `aaa-30-rv' both use the library
`term/aaa'.  The code in the library can use `(getenv "TERM")' to find
the full terminal type name.

   The library's name is constructed by concatenating the value of the
variable `term-file-prefix' and the terminal type.  Your `.emacs' file
can prevent the loading of the terminal-specific library by setting
`term-file-prefix' to `nil'.

   Emacs runs the hook `term-setup-hook' at the end of initialization,
after both your `.emacs' file and any terminal-specific library have
been read in.  Add hook functions to this hook if you wish to override
part of any of the terminal-specific libraries and to define
initializations for terminals that do not have a library.  *Note
Hooks::.


File: emacs,  Node: Find Init,  Next: Init Non-ASCII,  Prev: Terminal Init,  Up: Init File

48.4.4 How Emacs Finds Your Init File
-------------------------------------

Normally Emacs uses the environment variable `HOME' (*note HOME:
General Variables.) to find `.emacs'; that's what `~' means in a file
name.  If `.emacs' is not found inside `~/' (nor `.emacs.el'), Emacs
looks for `~/.emacs.d/init.el' (which, like `~/.emacs.el', can be
byte-compiled).

   However, if you run Emacs from a shell started by `su', Emacs tries
to find your own `.emacs', not that of the user you are currently
pretending to be.  The idea is that you should get your own editor
customizations even if you are running as the super user.

   More precisely, Emacs first determines which user's init file to use.
It gets your user name from the environment variables `LOGNAME' and
`USER'; if neither of those exists, it uses effective user-ID.  If that
user name matches the real user-ID, then Emacs uses `HOME'; otherwise,
it looks up the home directory corresponding to that user name in the
system's data base of users.


File: emacs,  Node: Init Non-ASCII,  Prev: Find Init,  Up: Init File

48.4.5 Non-ASCII Characters in Init Files
-----------------------------------------

Language and coding systems may cause problems if your init file
contains non-ASCII characters, such as accented letters, in strings or
key bindings.

   If you want to use non-ASCII characters in your init file, you
should put a `-*-coding: CODING-SYSTEM-*-' tag on the first line of the
init file, and specify a coding system that supports the character(s)
in question.  *Note Recognize Coding::.  This is because the defaults
for decoding non-ASCII text might not yet be set up by the time Emacs
reads those parts of your init file which use such strings, possibly
leading Emacs to decode those strings incorrectly.  You should then
avoid adding Emacs Lisp code that modifies the coding system in other
ways, such as calls to `set-language-environment'.

   To bind non-ASCII keys, you must use a vector (*note Init
Rebinding::).  The string syntax cannot be used, since the non-ASCII
characters will be interpreted as meta keys.  For instance:

     (global-set-key [?CHAR] 'some-function)

Type `C-q', followed by the key you want to bind, to insert CHAR.

   *Warning:* if you change the keyboard encoding, or change between
multibyte and unibyte mode, or anything that would alter which code
`C-q' would insert for that character, this key binding may stop
working.  It is therefore advisable to use one and only one coding
system, for your init file as well as the files you edit.  For example,
don't mix the `latin-1' and `latin-9' coding systems.


File: emacs,  Node: Quitting,  Next: Lossage,  Prev: Customization,  Up: Top

49 Quitting and Aborting
************************

`C-g'
`C-<BREAK> (MS-DOS only)'
     Quit: cancel running or partially typed command.

`C-]'
     Abort innermost recursive editing level and cancel the command
     which invoked it (`abort-recursive-edit').

`<ESC> <ESC> <ESC>'
     Either quit or abort, whichever makes sense
     (`keyboard-escape-quit').

`M-x top-level'
     Abort all recursive editing levels that are currently executing.

`C-/'
`C-x u'
`C-_'
     Cancel a previously made change in the buffer contents (`undo').

   There are two ways of canceling a command before it has finished:
"quitting" with `C-g', and "aborting" with `C-]' or `M-x top-level'.
Quitting cancels a partially typed command, or one which is still
running.  Aborting exits a recursive editing level and cancels the
command that invoked the recursive edit (*note Recursive Edit::).

   Quitting with `C-g' is the way to get rid of a partially typed
command, or a numeric argument that you don't want.  Furthermore, if
you are in the middle of a command that is running, `C-g' stops the
command in a relatively safe way.  For example, if you quit out of a
kill command that is taking a long time, either your text will _all_
still be in the buffer, or it will _all_ be in the kill ring, or maybe
both.  If the region is active, `C-g' deactivates the mark, unless
Transient Mark mode is off (*note Disabled Transient Mark::).  If you
are in the middle of an incremental search, `C-g' behaves specially; it
may take two successive `C-g' characters to get out of a search.  *Note
Incremental Search::, for details.

   On MS-DOS, the character `C-<BREAK>' serves as a quit character like
`C-g'.  The reason is that it is not feasible, on MS-DOS, to recognize
`C-g' while a command is running, between interactions with the user.
By contrast, it _is_ feasible to recognize `C-<BREAK>' at all times.
*Note MS-DOS Keyboard::.

   `C-g' works by setting the variable `quit-flag' to `t' the instant
`C-g' is typed; Emacs Lisp checks this variable frequently, and quits
if it is non-`nil'.  `C-g' is only actually executed as a command if
you type it while Emacs is waiting for input.  In that case, the
command it runs is `keyboard-quit'.

   On a text terminal, if you quit with `C-g' a second time before the
first `C-g' is recognized, you activate the "emergency escape" feature
and return to the shell.  *Note Emergency Escape::.

   There are some situations where you cannot quit.  When Emacs is
waiting for the operating system to do something, quitting is
impossible unless special pains are taken for the particular system
call within Emacs where the waiting occurs.  We have done this for the
system calls that users are likely to want to quit from, but it's
possible you will encounter a case not handled.  In one very common
case--waiting for file input or output using NFS--Emacs itself knows
how to quit, but many NFS implementations simply do not allow user
programs to stop waiting for NFS when the NFS server is hung.

   Aborting with `C-]' (`abort-recursive-edit') is used to get out of a
recursive editing level and cancel the command which invoked it.
Quitting with `C-g' does not do this, and could not do this, because it
is used to cancel a partially typed command _within_ the recursive
editing level.  Both operations are useful.  For example, if you are in
a recursive edit and type `C-u 8' to enter a numeric argument, you can
cancel that argument with `C-g' and remain in the recursive edit.

   The sequence `<ESC> <ESC> <ESC>' (`keyboard-escape-quit') can either
quit or abort.  (We defined it this way because <ESC> means "get out"
in many PC programs.)  It can cancel a prefix argument, clear a
selected region, or get out of a Query Replace, like `C-g'.  It can get
out of the minibuffer or a recursive edit, like `C-]'.  It can also get
out of splitting the frame into multiple windows, as with `C-x 1'.  One
thing it cannot do, however, is stop a command that is running.  That's
because it executes as an ordinary command, and Emacs doesn't notice it
until it is ready for the next command.

   The command `M-x top-level' is equivalent to "enough" `C-]' commands
to get you out of all the levels of recursive edits that you are in; it
also exits the minibuffer if it is active.  `C-]' gets you out one
level at a time, but `M-x top-level' goes out all levels at once.  Both
`C-]' and `M-x top-level' are like all other commands, and unlike
`C-g', in that they take effect only when Emacs is ready for a command.
`C-]' is an ordinary key and has its meaning only because of its
binding in the keymap.  *Note Recursive Edit::.

   `C-/' (`undo') is not strictly speaking a way of canceling a
command, but you can think of it as canceling a command that already
finished executing.  *Note Undo::, for more information about the undo
facility.


File: emacs,  Node: Lossage,  Next: Bugs,  Prev: Quitting,  Up: Top

50 Dealing with Emacs Trouble
*****************************

This section describes how to recognize and deal with situations in
which Emacs does not work as you expect, such as keyboard code mixups,
garbled displays, running out of memory, and crashes and hangs.

   *Note Bugs::, for what to do when you think you have found a bug in
Emacs.

* Menu:

* DEL Does Not Delete::   What to do if <DEL> doesn't delete.
* Stuck Recursive::       `[...]' in mode line around the parentheses.
* Screen Garbled::        Garbage on the screen.
* Text Garbled::          Garbage in the text.
* Memory Full::           How to cope when you run out of memory.
* After a Crash::         Recovering editing in an Emacs session that crashed.
* Emergency Escape::      What to do if Emacs stops responding.


File: emacs,  Node: DEL Does Not Delete,  Next: Stuck Recursive,  Up: Lossage

50.1 If <DEL> Fails to Delete
=============================

Every keyboard has a large key, usually labeled <Backspace>, which is
ordinarily used to erase the last character that you typed.  In Emacs,
this key is supposed to be equivalent to <DEL>.

   When Emacs starts up on a graphical display, it determines
automatically which key should be <DEL>.  In some unusual cases, Emacs
gets the wrong information from the system, and <Backspace> ends up
deleting forwards instead of backwards.

   Some keyboards also have a <Delete> key, which is ordinarily used to
delete forwards.  If this key deletes backward in Emacs, that too
suggests Emacs got the wrong information--but in the opposite sense.

   On a text terminal, if you find that <Backspace> prompts for a Help
command, like `Control-h', instead of deleting a character, it means
that key is actually sending the <BS> character.  Emacs ought to be
treating <BS> as <DEL>, but it isn't.

   In all of those cases, the immediate remedy is the same: use the
command `M-x normal-erase-is-backspace-mode'.  This toggles between the
two modes that Emacs supports for handling <DEL>, so if Emacs starts in
the wrong mode, this should switch to the right mode.  On a text
terminal, if you want to ask for help when <BS> is treated as <DEL>,
use <F1>; `C-?' may also work, if it sends character code 127.

   To fix the problem in every Emacs session, put one of the following
lines into your initialization file (*note Init File::).  For the first
case above, where <Backspace> deletes forwards instead of backwards,
use this line to make <Backspace> act as <DEL>:

     (normal-erase-is-backspace-mode 0)

For the other two cases, use this line:

     (normal-erase-is-backspace-mode 1)

   Another way to fix the problem for every Emacs session is to
customize the variable `normal-erase-is-backspace': the value `t'
specifies the mode where <BS> or <BACKSPACE> is <DEL>, and `nil'
specifies the other mode.  *Note Easy Customization::.


File: emacs,  Node: Stuck Recursive,  Next: Screen Garbled,  Prev: DEL Does Not Delete,  Up: Lossage

50.2 Recursive Editing Levels
=============================

Recursive editing levels are important and useful features of Emacs, but
they can seem like malfunctions if you do not understand them.

   If the mode line has square brackets `[...]' around the parentheses
that contain the names of the major and minor modes, you have entered a
recursive editing level.  If you did not do this on purpose, or if you
don't understand what that means, you should just get out of the
recursive editing level.  To do so, type `M-x top-level'.  *Note
Recursive Edit::.


File: emacs,  Node: Screen Garbled,  Next: Text Garbled,  Prev: Stuck Recursive,  Up: Lossage

50.3 Garbage on the Screen
==========================

If the text on a text terminal looks wrong, the first thing to do is
see whether it is wrong in the buffer.  Type `C-l' to redisplay the
entire screen.  If the screen appears correct after this, the problem
was entirely in the previous screen update.  (Otherwise, see the
following section.)

   Display updating problems often result from an incorrect terminfo
entry for the terminal you are using.  The file `etc/TERMS' in the
Emacs distribution gives the fixes for known problems of this sort.
`INSTALL' contains general advice for these problems in one of its
sections.  If you seem to be using the right terminfo entry, it is
possible that there is a bug in the terminfo entry, or a bug in Emacs
that appears for certain terminal types.


File: emacs,  Node: Text Garbled,  Next: Memory Full,  Prev: Screen Garbled,  Up: Lossage

50.4 Garbage in the Text
========================

If `C-l' shows that the text is wrong, first type `C-h l' to see what
commands you typed to produce the observed results.  Then try undoing
the changes step by step using `C-x u', until it gets back to a state
you consider correct.

   If a large portion of text appears to be missing at the beginning or
end of the buffer, check for the word `Narrow' in the mode line.  If it
appears, the text you don't see is probably still present, but
temporarily off-limits.  To make it accessible again, type `C-x n w'.
*Note Narrowing::.


File: emacs,  Node: Memory Full,  Next: After a Crash,  Prev: Text Garbled,  Up: Lossage

50.5 Running out of Memory
==========================

If you get the error message `Virtual memory exceeded', save your
modified buffers with `C-x s'.  This method of saving them has the
smallest need for additional memory.  Emacs keeps a reserve of memory
which it makes available when this error happens; that should be enough
to enable `C-x s' to complete its work.  When the reserve has been
used, `!MEM FULL!' appears at the beginning of the mode line,
indicating there is no more reserve.

   Once you have saved your modified buffers, you can exit this Emacs
session and start another, or you can use `M-x kill-some-buffers' to
free space in the current Emacs job.  If this frees up sufficient
space, Emacs will refill its memory reserve, and `!MEM FULL!' will
disappear from the mode line.  That means you can safely go on editing
in the same Emacs session.

   Do not use `M-x buffer-menu' to save or kill buffers when you run
out of memory, because the buffer menu needs a fair amount of memory
itself, and the reserve supply may not be enough.


File: emacs,  Node: After a Crash,  Next: Emergency Escape,  Prev: Memory Full,  Up: Lossage

50.6 Recovery After a Crash
===========================

If Emacs or the computer crashes, you can recover the files you were
editing at the time of the crash from their auto-save files.  To do
this, start Emacs again and type the command `M-x recover-session'.

   This command initially displays a buffer which lists interrupted
session files, each with its date.  You must choose which session to
recover from.  Typically the one you want is the most recent one.  Move
point to the one you choose, and type `C-c C-c'.

   Then `recover-session' considers each of the files that you were
editing during that session; for each such file, it asks whether to
recover that file.  If you answer `y' for a file, it shows the dates of
that file and its auto-save file, then asks once again whether to
recover that file.  For the second question, you must confirm with
`yes'.  If you do, Emacs visits the file but gets the text from the
auto-save file.

   When `recover-session' is done, the files you've chosen to recover
are present in Emacs buffers.  You should then save them.  Only
this--saving them--updates the files themselves.

   As a last resort, if you had buffers with content which were not
associated with any files, or if the autosave was not recent enough to
have recorded important changes, you can use the `etc/emacs-buffer.gdb'
script with GDB (the GNU Debugger) to retrieve them from a core
dump-provided that a core dump was saved, and that the Emacs executable
was not stripped of its debugging symbols.

   As soon as you get the core dump, rename it to another name such as
`core.emacs', so that another crash won't overwrite it.

   To use this script, run `gdb' with the file name of your Emacs
executable and the file name of the core dump, e.g. `gdb /usr/bin/emacs
core.emacs'.  At the `(gdb)' prompt, load the recovery script: `source
/usr/src/emacs/etc/emacs-buffer.gdb'.  Then type the command
`ybuffer-list' to see which buffers are available.  For each buffer, it
lists a buffer number.  To save a buffer, use `ysave-buffer'; you
specify the buffer number, and the file name to write that buffer into.
You should use a file name which does not already exist; if the file
does exist, the script does not make a backup of its old contents.


File: emacs,  Node: Emergency Escape,  Prev: After a Crash,  Up: Lossage

50.7 Emergency Escape
=====================

On text terminals, the "emergency escape" feature suspends Emacs
immediately if you type `C-g' a second time before Emacs can actually
respond to the first one by quitting.  This is so you can always get
out of GNU Emacs no matter how badly it might be hung.  When things are
working properly, Emacs recognizes and handles the first `C-g' so fast
that the second one won't trigger emergency escape.  However, if some
problem prevents Emacs from handling the first `C-g' properly, then the
second one will get you back to the shell.

   When you resume Emacs after a suspension caused by emergency escape,
it asks two questions before going back to what it had been doing:

     Auto-save? (y or n)
     Abort (and dump core)? (y or n)

Answer each one with `y' or `n' followed by <RET>.

   Saying `y' to `Auto-save?' causes immediate auto-saving of all
modified buffers in which auto-saving is enabled.  Saying `n' skips
this.

   Saying `y' to `Abort (and dump core)?' causes Emacs to crash,
dumping core.  This is to enable a wizard to figure out why Emacs was
failing to quit in the first place.  Execution does not continue after
a core dump.

   If you answer this question `n', Emacs execution resumes.  With
luck, Emacs will ultimately do the requested quit.  If not, each
subsequent `C-g' invokes emergency escape again.

   If Emacs is not really hung, just slow, you may invoke the double
`C-g' feature without really meaning to.  Then just resume and answer
`n' to both questions, and you will get back to the former state.  The
quit you requested will happen by and by.

   Emergency escape is active only for text terminals.  On graphical
displays, you can use the mouse to kill Emacs or switch to another
program.

   On MS-DOS, you must type `C-<BREAK>' (twice) to cause emergency
escape--but there are cases where it won't work, when system call hangs
or when Emacs is stuck in a tight loop in C code.


File: emacs,  Node: Bugs,  Next: Contributing,  Prev: Lossage,  Up: Top

51 Reporting Bugs
*****************

If you think you have found a bug in Emacs, please report it.  We
cannot promise to fix it, or always to agree that it is a bug, but we
certainly want to hear about it.  The same applies for new features you
would like to see added.  The following sections will help you to
construct an effective bug report.

* Menu:

* Known Problems::               How to read about known problems and bugs.
* Criteria:  Bug Criteria.       Have you really found a bug?
* Understanding Bug Reporting::  How to report a bug effectively.
* Checklist::                    Steps to follow for a good bug report.
* Sending Patches::              How to send a patch for GNU Emacs.


File: emacs,  Node: Known Problems,  Next: Bug Criteria,  Up: Bugs

51.1 Reading Existing Bug Reports and Known Problems
====================================================

Before reporting a bug, if at all possible please check to see if it is
already known about.  Indeed, it may already have been fixed in a later
release of Emacs, or in the development version.  Here is a list of the
main places you can read about known issues:

   * The `etc/PROBLEMS' file; type `C-h C-p' to read it.  This file
     contains a list of particularly well-known issues that have been
     encountered in compiling, installing and running Emacs.  Often,
     there are suggestions for workarounds and solutions.

   * Some additional user-level problems can be found in *note Bugs and
     problems: (efaq)Bugs and problems.

   * The GNU Bug Tracker at `http://debbugs.gnu.org'.  Emacs bugs are
     filed in the tracker under the `emacs' package.  The tracker
     records information about the status of each bug, the initial bug
     report, and the follow-up messages by the bug reporter and Emacs
     developers.  You can search for bugs by subject, severity, and
     other criteria.

     Instead of browsing the bug tracker as a webpage, you can browse it
     from Emacs using the `debbugs' package, which can be downloaded
     via the Package Menu (*note Packages::).  This package provides the
     command `M-x debbugs-gnu' to list bugs, and `M-x
     debbugs-gnu-search' to search for a specific bug.

   * The `bug-gnu-emacs' mailing list (also available as the newsgroup
     `gnu.emacs.bug').  You can read the list archives at
     `http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs'.  This list
     works as a "mirror" of the Emacs bug reports and follow-up messages
     which are sent to the bug tracker.  It also contains old bug
     reports from before the bug tracker was introduced (in early 2008).

     If you like, you can subscribe to the list.  Be aware that its
     purpose is to provide the Emacs maintainers with information about
     bugs and feature requests, so reports may contain fairly large
     amounts of data; spectators should not complain about this.

   * The `emacs-pretest-bug' mailing list.  This list is no longer
     used, and is mainly of historical interest.  At one time, it was
     used for bug reports in development (i.e., not yet released)
     versions of Emacs.  You can read the archives for 2003 to mid 2007
     at `http://lists.gnu.org/archive/html/emacs-pretest-bug/'.
     Nowadays, it is an alias for `bug-gnu-emacs'.

   * The `emacs-devel' mailing list.  Sometimes people report bugs to
     this mailing list.  This is not the main purpose of the list,
     however, and it is much better to send bug reports to the bug
     list.  You should not feel obliged to read this list before
     reporting a bug.



File: emacs,  Node: Bug Criteria,  Next: Understanding Bug Reporting,  Prev: Known Problems,  Up: Bugs

51.2 When Is There a Bug
========================

If Emacs accesses an invalid memory location ("segmentation fault"), or
exits with an operating system error message that indicates a problem
in the program (as opposed to something like "disk full"), then it is
certainly a bug.

   If the Emacs display does not correspond properly to the contents of
the buffer, then it is a bug.  But you should check that features like
buffer narrowing (*note Narrowing::), which can hide parts of the
buffer or change how it is displayed, are not responsible.

   Taking forever to complete a command can be a bug, but you must make
sure that it is really Emacs's fault.  Some commands simply take a long
time.  Type `C-g' (`C-<BREAK>' on MS-DOS) and then `C-h l' to see
whether the input Emacs received was what you intended to type; if the
input was such that you _know_ it should have been processed quickly,
report a bug.  If you don't know whether the command should take a long
time, find out by looking in the manual or by asking for assistance.

   If a command you are familiar with causes an Emacs error message in a
case where its usual definition ought to be reasonable, it is probably a
bug.

   If a command does the wrong thing, that is a bug.  But be sure you
know for certain what it ought to have done.  If you aren't familiar
with the command, it might actually be working right.  If in doubt,
read the command's documentation (*note Name Help::).

   A command's intended definition may not be the best possible
definition for editing with.  This is a very important sort of problem,
but it is also a matter of judgment.  Also, it is easy to come to such
a conclusion out of ignorance of some of the existing features.  It is
probably best not to complain about such a problem until you have
checked the documentation in the usual ways, feel confident that you
understand it, and know for certain that what you want is not
available.  Ask other Emacs users, too.  If you are not sure what the
command is supposed to do after a careful reading of the manual, check
the index and glossary for any terms that may be unclear.

   If after careful rereading of the manual you still do not understand
what the command should do, that indicates a bug in the manual, which
you should report.  The manual's job is to make everything clear to
people who are not Emacs experts--including you.  It is just as
important to report documentation bugs as program bugs.

   If the built-in documentation for a function or variable disagrees
with the manual, one of them must be wrong; that is a bug.


File: emacs,  Node: Understanding Bug Reporting,  Next: Checklist,  Prev: Bug Criteria,  Up: Bugs

51.3 Understanding Bug Reporting
================================

When you decide that there is a bug, it is important to report it and
to report it in a way which is useful.  What is most useful is an exact
description of what commands you type, starting with the shell command
to run Emacs, until the problem happens.

   The most important principle in reporting a bug is to report
_facts_.  Hypotheses and verbal descriptions are no substitute for the
detailed raw data.  Reporting the facts is straightforward, but many
people strain to posit explanations and report them instead of the
facts.  If the explanations are based on guesses about how Emacs is
implemented, they will be useless; meanwhile, lacking the facts, we
will have no real information about the bug.  If you want to actually
_debug_ the problem, and report explanations that are more than
guesses, that is useful--but please include the raw facts as well.

   For example, suppose that you type `C-x C-f /glorp/baz.ugh <RET>',
visiting a file which (you know) happens to be rather large, and Emacs
displays `I feel pretty today'.  The bug report would need to provide
all that information.  You should not assume that the problem is due to
the size of the file and say, "I visited a large file, and Emacs
displayed `I feel pretty today'."  This is what we mean by "guessing
explanations".  The problem might be due to the fact that there is a
`z' in the file name.  If this is so, then when we got your report, we
would try out the problem with some "large file", probably with no `z'
in its name, and not see any problem.  There is no way we could guess
that we should try visiting a file with a `z' in its name.

   You should not even say "visit a file" instead of `C-x C-f'.
Similarly, rather than saying "if I have three characters on the line",
say "after I type `<RET> A B C <RET> C-p'", if that is the way you
entered the text.

   If possible, try quickly to reproduce the bug by invoking Emacs with
`emacs -Q' (so that Emacs starts with no initial customizations; *note
Initial Options::), and repeating the steps that you took to trigger
the bug.  If you can reproduce the bug this way, that rules out bugs in
your personal customizations.  Then your bug report should begin by
stating that you started Emacs with `emacs -Q', followed by the exact
sequence of steps for reproducing the bug.  If possible, inform us of
the exact contents of any file that is needed to reproduce the bug.

   Some bugs are not reproducible from `emacs -Q'; some are not easily
reproducible at all.  In that case, you should report what you
have--but, as before, please stick to the raw facts about what you did
to trigger the bug the first time.


File: emacs,  Node: Checklist,  Next: Sending Patches,  Prev: Understanding Bug Reporting,  Up: Bugs

51.4 Checklist for Bug Reports
==============================

Before reporting a bug, first try to see if the problem has already
been reported (*note Known Problems::).

   If you are able to, try the latest release of Emacs to see if the
problem has already been fixed.  Even better is to try the latest
development version.  We recognize that this is not easy for some
people, so do not feel that you absolutely must do this before making a
report.

   The best way to write a bug report for Emacs is to use the command
`M-x report-emacs-bug'.  This sets up a mail buffer (*note Sending
Mail::) and automatically inserts _some_ of the essential information.
However, it cannot supply all the necessary information; you should
still read and follow the guidelines below, so you can enter the other
crucial information by hand before you send the message.  You may feel
that some of the information inserted by `M-x report-emacs-bug' is not
relevant, but unless you are absolutely sure it is best to leave it, so
that the developers can decide for themselves.

   When you have finished writing your report, type `C-c C-c' and it
will be sent to the Emacs maintainers at <bug-gnu-emacs@gnu.org>.  (If
you want to suggest an improvement or new feature, use the same
address.)  If you cannot send mail from inside Emacs, you can copy the
text of your report to your normal mail client (if your system supports
it, you can type `C-c m' to have Emacs do this for you) and send it to
that address.  Or you can simply send an email to that address
describing the problem.

   Your report will be sent to the `bug-gnu-emacs' mailing list, and
stored in the GNU Bug Tracker at `http://debbugs.gnu.org'.  Please
include a valid reply email address, in case we need to ask you for
more information about your report.  Submissions are moderated, so
there may be a delay before your report appears.

   You do not need to know how the Gnu Bug Tracker works in order to
report a bug, but if you want to, you can read the tracker's online
documentation to see the various features you can use.

   All mail sent to the `bug-gnu-emacs' mailing list is also gatewayed
to the `gnu.emacs.bug' newsgroup.  The reverse is also true, but we ask
you not to post bug reports (or replies) via the newsgroup.  It can
make it much harder to contact you if we need to ask for more
information, and it does not integrate well with the bug tracker.

   If your data is more than 500,000 bytes, please don't include it
directly in the bug report; instead, offer to send it on request, or
make it available by ftp and say where.

   To enable maintainers to investigate a bug, your report should
include all these things:

   * The version number of Emacs.  Without this, we won't know whether
     there is any point in looking for the bug in the current version
     of GNU Emacs.

     `M-x report-emacs-bug' includes this information automatically,
     but if you are not using that command for your report you can get
     the version number by typing `M-x emacs-version <RET>'.  If that
     command does not work, you probably have something other than GNU
     Emacs, so you will have to report the bug somewhere else.

   * The type of machine you are using, and the operating system name
     and version number (again, automatically included by `M-x
     report-emacs-bug').  `M-x emacs-version <RET>' provides this
     information too.  Copy its output from the `*Messages*' buffer, so
     that you get it all and get it accurately.

   * The operands given to the `configure' command when Emacs was
     installed (automatically included by `M-x report-emacs-bug').

   * A complete list of any modifications you have made to the Emacs
     source.  (We may not have time to investigate the bug unless it
     happens in an unmodified Emacs.  But if you've made modifications
     and you don't tell us, you are sending us on a wild goose chase.)

     Be precise about these changes.  A description in English is not
     enough--send a context diff for them.

     Adding files of your own, or porting to another machine, is a
     modification of the source.

   * Details of any other deviations from the standard procedure for
     installing GNU Emacs.

   * The complete text of any files needed to reproduce the bug.

     If you can tell us a way to cause the problem without visiting any
     files, please do so.  This makes it much easier to debug.  If you
     do need files, make sure you arrange for us to see their exact
     contents.  For example, it can matter whether there are spaces at
     the ends of lines, or a newline after the last line in the buffer
     (nothing ought to care whether the last line is terminated, but
     try telling the bugs that).

   * The precise commands we need to type to reproduce the bug.  If at
     all possible, give a full recipe for an Emacs started with the `-Q'
     option (*note Initial Options::).  This bypasses your personal
     customizations.

     One way to record the input to Emacs precisely is to write a
     dribble file.  To start the file, use the `M-x open-dribble-file
     <RET>' command.  From then on, Emacs copies all your input to the
     specified dribble file until the Emacs process is killed.

   * For possible display bugs, the terminal type (the value of
     environment variable `TERM'), the complete termcap entry for the
     terminal from `/etc/termcap' (since that file is not identical on
     all machines), and the output that Emacs actually sent to the
     terminal.

     The way to collect the terminal output is to execute the Lisp
     expression

          (open-termscript "~/termscript")

     using `M-:' or from the `*scratch*' buffer just after starting
     Emacs.  From then on, Emacs copies all terminal output to the
     specified termscript file as well, until the Emacs process is
     killed.  If the problem happens when Emacs starts up, put this
     expression into your Emacs initialization file so that the
     termscript file will be open when Emacs displays the screen for
     the first time.

     Be warned: it is often difficult, and sometimes impossible, to fix
     a terminal-dependent bug without access to a terminal of the type
     that stimulates the bug.

   * If non-ASCII text or internationalization is relevant, the locale
     that was current when you started Emacs.  On GNU/Linux and Unix
     systems, or if you use a Posix-style shell such as Bash, you can
     use this shell command to view the relevant values:

          echo LC_ALL=$LC_ALL LC_COLLATE=$LC_COLLATE LC_CTYPE=$LC_CTYPE \
            LC_MESSAGES=$LC_MESSAGES LC_TIME=$LC_TIME LANG=$LANG

     Alternatively, use the `locale' command, if your system has it, to
     display your locale settings.

     You can use the `M-!' command to execute these commands from
     Emacs, and then copy the output from the `*Messages*' buffer into
     the bug report.  Alternatively, `M-x getenv <RET> LC_ALL <RET>'
     will display the value of `LC_ALL' in the echo area, and you can
     copy its output from the `*Messages*' buffer.

   * A description of what behavior you observe that you believe is
     incorrect.  For example, "The Emacs process gets a fatal signal",
     or, "The resulting text is as follows, which I think is wrong."

     Of course, if the bug is that Emacs gets a fatal signal, then one
     can't miss it.  But if the bug is incorrect text, the maintainer
     might fail to notice what is wrong.  Why leave it to chance?

     Even if the problem you experience is a fatal signal, you should
     still say so explicitly.  Suppose something strange is going on,
     such as, your copy of the source is out of sync, or you have
     encountered a bug in the C library on your system.  (This has
     happened!)  Your copy might crash and the copy here might not.  If
     you _said_ to expect a crash, then when Emacs here fails to crash,
     we would know that the bug was not happening.  If you don't say to
     expect a crash, then we would not know whether the bug was
     happening--we would not be able to draw any conclusion from our
     observations.

   * If the bug is that the Emacs Manual or the Emacs Lisp Reference
     Manual fails to describe the actual behavior of Emacs, or that the
     text is confusing, copy in the text from the online manual which
     you think is at fault.  If the section is small, just the section
     name is enough.

   * If the manifestation of the bug is an Emacs error message, it is
     important to report the precise text of the error message, and a
     backtrace showing how the Lisp program in Emacs arrived at the
     error.

     To get the error message text accurately, copy it from the
     `*Messages*' buffer into the bug report.  Copy all of it, not just
     part.

     To make a backtrace for the error, use `M-x toggle-debug-on-error'
     before the error happens (that is to say, you must give that
     command and then make the bug happen).  This causes the error to
     start the Lisp debugger, which shows you a backtrace.  Copy the
     text of the debugger's backtrace into the bug report.  *Note The
     Lisp Debugger: (elisp)Debugger, for information on debugging Emacs
     Lisp programs with the Edebug package.

     This use of the debugger is possible only if you know how to make
     the bug happen again.  If you can't make it happen again, at least
     copy the whole error message.

     If Emacs appears to be stuck in an infinite loop or in a very long
     operation, typing `C-g' with the variable `debug-on-quit'
     non-`nil' will start the Lisp debugger and show a backtrace.  This
     backtrace is useful for debugging such long loops, so if you can
     produce it, copy it into the bug report.

     If you cannot get Emacs to respond to `C-g' (e.g., because
     `inhibit-quit' is set), then you can try sending the signal
     specified by `debug-on-event' (default SIGUSR2) from outside Emacs
     to cause it to enter the debugger.

   * Check whether any programs you have loaded into the Lisp world,
     including your initialization file, set any variables that may
     affect the functioning of Emacs.  Also, see whether the problem
     happens in a freshly started Emacs without loading your
     initialization file (start Emacs with the `-Q' switch to prevent
     loading the init files).  If the problem does _not_ occur then,
     you must report the precise contents of any programs that you must
     load into the Lisp world in order to cause the problem to occur.

   * If the problem does depend on an init file or other Lisp programs
     that are not part of the standard Emacs system, then you should
     make sure it is not a bug in those programs by complaining to
     their maintainers first.  After they verify that they are using
     Emacs in a way that is supposed to work, they should report the
     bug.

   * If you wish to mention something in the GNU Emacs source, show the
     line of code with a few lines of context.  Don't just give a line
     number.

     The line numbers in the development sources don't match those in
     your sources.  It would take extra work for the maintainers to
     determine what code is in your version at a given line number, and
     we could not be certain.

   * Additional information from a C debugger such as GDB might enable
     someone to find a problem on a machine which he does not have
     available.  If you don't know how to use GDB, please read the GDB
     manual--it is not very long, and using GDB is easy.  You can find
     the GDB distribution, including the GDB manual in online form, in
     most of the same places you can find the Emacs distribution.  To
     run Emacs under GDB, you should switch to the `src' subdirectory
     in which Emacs was compiled, then do `gdb emacs'.  It is important
     for the directory `src' to be current so that GDB will read the
     `.gdbinit' file in this directory.

     However, you need to think when you collect the additional
     information if you want it to show what causes the bug.

     For example, many people send just a backtrace, but that is not
     very useful by itself.  A simple backtrace with arguments often
     conveys little about what is happening inside GNU Emacs, because
     most of the arguments listed in the backtrace are pointers to Lisp
     objects.  The numeric values of these pointers have no
     significance whatever; all that matters is the contents of the
     objects they point to (and most of the contents are themselves
     pointers).

     To provide useful information, you need to show the values of Lisp
     objects in Lisp notation.  Do this for each variable which is a
     Lisp object, in several stack frames near the bottom of the stack.
     Look at the source to see which variables are Lisp objects,
     because the debugger thinks of them as integers.

     To show a variable's value in Lisp syntax, first print its value,
     then use the user-defined GDB command `pr' to print the Lisp
     object in Lisp syntax.  (If you must use another debugger, call
     the function `debug_print' with the object as an argument.)  The
     `pr' command is defined by the file `.gdbinit', and it works only
     if you are debugging a running process (not with a core dump).

     To make Lisp errors stop Emacs and return to GDB, put a breakpoint
     at `Fsignal'.

     For a short listing of Lisp functions running, type the GDB
     command `xbacktrace'.

     The file `.gdbinit' defines several other commands that are useful
     for examining the data types and contents of Lisp objects.  Their
     names begin with `x'.  These commands work at a lower level than
     `pr', and are less convenient, but they may work even when `pr'
     does not, such as when debugging a core dump or when Emacs has had
     a fatal signal.

     More detailed advice and other useful techniques for debugging
     Emacs are available in the file `etc/DEBUG' in the Emacs
     distribution.  That file also includes instructions for
     investigating problems whereby Emacs stops responding (many people
     assume that Emacs is "hung", whereas in fact it might be in an
     infinite loop).

     To find the file `etc/DEBUG' in your Emacs installation, use the
     directory name stored in the variable `data-directory'.

   Here are some things that are not necessary in a bug report:

   * A description of the envelope of the bug--this is not necessary
     for a reproducible bug.

     Often people who encounter a bug spend a lot of time investigating
     which changes to the input file will make the bug go away and which
     changes will not affect it.

     This is often time-consuming and not very useful, because the way
     we will find the bug is by running a single example under the
     debugger with breakpoints, not by pure deduction from a series of
     examples.  You might as well save time by not searching for
     additional examples.  It is better to send the bug report right
     away, go back to editing, and find another bug to report.

     Of course, if you can find a simpler example to report _instead_ of
     the original one, that is a convenience.  Errors in the output
     will be easier to spot, running under the debugger will take less
     time, etc.

     However, simplification is not vital; if you can't do this or
     don't have time to try, please report the bug with your original
     test case.

   * A core dump file.

     Debugging the core dump might be useful, but it can only be done on
     your machine, with your Emacs executable.  Therefore, sending the
     core dump file to the Emacs maintainers won't be useful.  Above
     all, don't include the core file in an email bug report!  Such a
     large message can be extremely inconvenient.

   * A system-call trace of Emacs execution.

     System-call traces are very useful for certain special kinds of
     debugging, but in most cases they give little useful information.
     It is therefore strange that many people seem to think that _the_
     way to report information about a crash is to send a system-call
     trace.  Perhaps this is a habit formed from experience debugging
     programs that don't have source code or debugging symbols.

     In most programs, a backtrace is normally far, far more
     informative than a system-call trace.  Even in Emacs, a simple
     backtrace is generally more informative, though to give full
     information you should supplement the backtrace by displaying
     variable values and printing them as Lisp objects with `pr' (see
     above).

   * A patch for the bug.

     A patch for the bug is useful if it is a good one.  But don't omit
     the other information that a bug report needs, such as the test
     case, on the assumption that a patch is sufficient.  We might see
     problems with your patch and decide to fix the problem another
     way, or we might not understand it at all.  And if we can't
     understand what bug you are trying to fix, or why your patch
     should be an improvement, we mustn't install it.

     *Note Sending Patches::, for guidelines on how to make it easy for
     us to understand and install your patches.

   * A guess about what the bug is or what it depends on.

     Such guesses are usually wrong.  Even experts can't guess right
     about such things without first using the debugger to find the
     facts.


File: emacs,  Node: Sending Patches,  Prev: Checklist,  Up: Bugs

51.5 Sending Patches for GNU Emacs
==================================

If you would like to write bug fixes or improvements for GNU Emacs,
that is very helpful.  When you send your changes, please follow these
guidelines to make it easy for the maintainers to use them.  If you
don't follow these guidelines, your information might still be useful,
but using it will take extra work.  Maintaining GNU Emacs is a lot of
work in the best of circumstances, and we can't keep up unless you do
your best to help.

   * Send an explanation with your changes of what problem they fix or
     what improvement they bring about.  For a fix for an existing bug,
     it is best to reply to the relevant discussion on the
     `bug-gnu-emacs' list, or the bug entry in the GNU Bug Tracker at
     `http://debbugs.gnu.org'.  Explain why your change fixes the bug.

   * Always include a proper bug report for the problem you think you
     have fixed.  We need to convince ourselves that the change is
     right before installing it.  Even if it is correct, we might have
     trouble understanding it if we don't have a way to reproduce the
     problem.

   * Include all the comments that are appropriate to help people
     reading the source in the future understand why this change was
     needed.

   * Don't mix together changes made for different reasons.  Send them
     _individually_.

     If you make two changes for separate reasons, then we might not
     want to install them both.  We might want to install just one.  If
     you send them all jumbled together in a single set of diffs, we
     have to do extra work to disentangle them--to figure out which
     parts of the change serve which purpose.  If we don't have time
     for this, we might have to ignore your changes entirely.

     If you send each change as soon as you have written it, with its
     own explanation, then two changes never get tangled up, and we can
     consider each one properly without any extra work to disentangle
     them.

   * Send each change as soon as that change is finished.  Sometimes
     people think they are helping us by accumulating many changes to
     send them all together.  As explained above, this is absolutely
     the worst thing you could do.

     Since you should send each change separately, you might as well
     send it right away.  That gives us the option of installing it
     immediately if it is important.

   * Use `diff -c' to make your diffs.  Diffs without context are hard
     to install reliably.  More than that, they are hard to study; we
     must always study a patch to decide whether we want to install it.
     Unidiff format is better than contextless diffs, but not as easy
     to read as `-c' format.

     If you have GNU diff, use `diff -c -F'^[_a-zA-Z0-9$]+ *('' when
     making diffs of C code.  This shows the name of the function that
     each change occurs in.

   * Avoid any ambiguity as to which is the old version and which is
     the new.  Please make the old version the first argument to diff,
     and the new version the second argument.  And please give one
     version or the other a name that indicates whether it is the old
     version or your new changed one.

   * Write the change log entries for your changes.  This is both to
     save us the extra work of writing them, and to help explain your
     changes so we can understand them.

     The purpose of the change log is to show people where to find what
     was changed.  So you need to be specific about what functions you
     changed; in large functions, it's often helpful to indicate where
     within the function the change was.

     On the other hand, once you have shown people where to find the
     change, you need not explain its purpose in the change log.  Thus,
     if you add a new function, all you need to say about it is that it
     is new.  If you feel that the purpose needs explaining, it
     probably does--but put the explanation in comments in the code.
     It will be more useful there.

     Please read the `ChangeLog' files in the `src' and `lisp'
     directories to see what sorts of information to put in, and to
     learn the style that we use.  *Note Change Log::.

   * When you write the fix, keep in mind that we can't install a
     change that would break other systems.  Please think about what
     effect your change will have if compiled on another type of system.

     Sometimes people send fixes that _might_ be an improvement in
     general--but it is hard to be sure of this.  It's hard to install
     such changes because we have to study them very carefully.  Of
     course, a good explanation of the reasoning by which you concluded
     the change was correct can help convince us.

     The safest changes are changes to the configuration files for a
     particular machine.  These are safe because they can't create new
     bugs on other machines.

     Please help us keep up with the workload by designing the patch in
     a form that is clearly safe to install.


File: emacs,  Node: Contributing,  Next: Service,  Prev: Bugs,  Up: Top

52 Contributing to Emacs Development
************************************

If you would like to help pretest Emacs releases to assure they work
well, or if you would like to work on improving Emacs, please contact
the maintainers at <emacs-devel@gnu.org>.  A pretester should be
prepared to investigate bugs as well as report them.  If you'd like to
work on improving Emacs, please ask for suggested projects or suggest
your own ideas.

   If you have already written an improvement, please tell us about it.
If you have not yet started work, it is useful to contact
<emacs-devel@gnu.org> before you start; it might be possible to suggest
ways to make your extension fit in better with the rest of Emacs.

   The development version of Emacs can be downloaded from the
repository where it is actively maintained by a group of developers.
See the Emacs project page `http://savannah.gnu.org/projects/emacs/'
for details.

   For more information on how to contribute, see the `etc/CONTRIBUTE'
file in the Emacs distribution.


File: emacs,  Node: Service,  Next: Copying,  Prev: Contributing,  Up: Top

53 How To Get Help with GNU Emacs
*********************************

If you need help installing, using or changing GNU Emacs, there are two
ways to find it:

   * Send a message to the mailing list <help-gnu-emacs@gnu.org>, or
     post your request on newsgroup `gnu.emacs.help'.  (This mailing
     list and newsgroup interconnect, so it does not matter which one
     you use.)

   * Look in the service directory for someone who might help you for a
     fee.  The service directory is found in the file named
     `etc/SERVICE' in the Emacs distribution.


File: emacs,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Service,  Up: Top

Appendix A GNU GENERAL PUBLIC LICENSE
*************************************

                        Version 3, 29 June 2007

     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'

     Everyone is permitted to copy and distribute verbatim copies of this
     license document, but changing it is not allowed.

Preamble
========

The GNU General Public License is a free, copyleft license for software
and other kinds of works.

   The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains
free software for all its users.  We, the Free Software Foundation, use
the GNU General Public License for most of our software; it applies
also to any other work released this way by its authors.  You can apply
it to your programs, too.

   When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

   To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.

   For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

   Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

   For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

   Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.

   Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

   The precise terms and conditions for copying, distribution and
modification follow.

TERMS AND CONDITIONS
====================

  0. Definitions.

     "This License" refers to version 3 of the GNU General Public
     License.

     "Copyright" also means copyright-like laws that apply to other
     kinds of works, such as semiconductor masks.

     "The Program" refers to any copyrightable work licensed under this
     License.  Each licensee is addressed as "you".  "Licensees" and
     "recipients" may be individuals or organizations.

     To "modify" a work means to copy from or adapt all or part of the
     work in a fashion requiring copyright permission, other than the
     making of an exact copy.  The resulting work is called a "modified
     version" of the earlier work or a work "based on" the earlier work.

     A "covered work" means either the unmodified Program or a work
     based on the Program.

     To "propagate" a work means to do anything with it that, without
     permission, would make you directly or secondarily liable for
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
     copying, distribution (with or without modification), making
     available to the public, and in some countries other activities as
     well.

     To "convey" a work means any kind of propagation that enables other
     parties to make or receive copies.  Mere interaction with a user
     through a computer network, with no transfer of a copy, is not
     conveying.

     An interactive user interface displays "Appropriate Legal Notices"
     to the extent that it includes a convenient and prominently visible
     feature that (1) displays an appropriate copyright notice, and (2)
     tells the user that there is no warranty for the work (except to
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
     License.  If the interface presents a list of user commands or
     options, such as a menu, a prominent item in the list meets this
     criterion.

  1. Source Code.

     The "source code" for a work means the preferred form of the work
     for making modifications to it.  "Object code" means any
     non-source form of a work.

     A "Standard Interface" means an interface that either is an
     official standard defined by a recognized standards body, or, in
     the case of interfaces specified for a particular programming
     language, one that is widely used among developers working in that
     language.

     The "System Libraries" of an executable work include anything,
     other than the work as a whole, that (a) is included in the normal
     form of packaging a Major Component, but which is not part of that
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
     essential component (kernel, window system, and so on) of the
     specific operating system (if any) on which the executable work
     runs, or a compiler used to produce the work, or an object code
     interpreter used to run it.

     The "Corresponding Source" for a work in object code form means all
     the source code needed to generate, install, and (for an executable
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
     available free programs which are used unmodified in performing
     those activities but which are not part of the work.  For example,
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
     communication or control flow between those subprograms and other
     parts of the work.

     The Corresponding Source need not include anything that users can
     regenerate automatically from other parts of the Corresponding
     Source.

     The Corresponding Source for a work in source code form is that
     same work.

  2. Basic Permissions.

     All rights granted under this License are granted for the term of
     copyright on the Program, and are irrevocable provided the stated
     conditions are met.  This License explicitly affirms your unlimited
     permission to run the unmodified Program.  The output from running
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.

     You may make, run and propagate covered works that you do not
     convey, without conditions so long as your license otherwise
     remains in force.  You may convey covered works to others for the
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.

     Conveying under any other circumstances is permitted solely under
     the conditions stated below.  Sublicensing is not allowed; section
     10 makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

     No covered work shall be deemed part of an effective technological
     measure under any applicable law fulfilling obligations under
     article 11 of the WIPO copyright treaty adopted on 20 December
     1996, or similar laws prohibiting or restricting circumvention of
     such measures.

     When you convey a covered work, you waive any legal power to forbid
     circumvention of technological measures to the extent such
     circumvention is effected by exercising rights under this License
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
     enforcing, against the work's users, your or third parties' legal
     rights to forbid circumvention of technological measures.

  4. Conveying Verbatim Copies.

     You may convey verbatim copies of the Program's source code as you
     receive it, in any medium, provided that you conspicuously and
     appropriately publish on each copy an appropriate copyright notice;
     keep intact all notices stating that this License and any
     non-permissive terms added in accord with section 7 apply to the
     code; keep intact all notices of the absence of any warranty; and
     give all recipients a copy of this License along with the Program.

     You may charge any price or no price for each copy that you convey,
     and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

     You may convey a work based on the Program, or the modifications to
     produce it from the Program, in the form of source code under the
     terms of section 4, provided that you also meet all of these
     conditions:

       a. The work must carry prominent notices stating that you
          modified it, and giving a relevant date.

       b. The work must carry prominent notices stating that it is
          released under this License and any conditions added under
          section 7.  This requirement modifies the requirement in
          section 4 to "keep intact all notices".

       c. You must license the entire work, as a whole, under this
          License to anyone who comes into possession of a copy.  This
          License will therefore apply, along with any applicable
          section 7 additional terms, to the whole of the work, and all
          its parts, regardless of how they are packaged.  This License
          gives no permission to license the work in any other way, but
          it does not invalidate such permission if you have separately
          received it.

       d. If the work has interactive user interfaces, each must display
          Appropriate Legal Notices; however, if the Program has
          interactive interfaces that do not display Appropriate Legal
          Notices, your work need not make them do so.

     A compilation of a covered work with other separate and independent
     works, which are not by their nature extensions of the covered
     work, and which are not combined with it such as to form a larger
     program, in or on a volume of a storage or distribution medium, is
     called an "aggregate" if the compilation and its resulting
     copyright are not used to limit the access or legal rights of the
     compilation's users beyond what the individual works permit.
     Inclusion of a covered work in an aggregate does not cause this
     License to apply to the other parts of the aggregate.

  6. Conveying Non-Source Forms.

     You may convey a covered work in object code form under the terms
     of sections 4 and 5, provided that you also convey the
     machine-readable Corresponding Source under the terms of this
     License, in one of these ways:

       a. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by the
          Corresponding Source fixed on a durable physical medium
          customarily used for software interchange.

       b. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by a
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
          product model, to give anyone who possesses the object code
          either (1) a copy of the Corresponding Source for all the
          software in the product that is covered by this License, on a
          durable physical medium customarily used for software
          interchange, for a price no more than your reasonable cost of
          physically performing this conveying of source, or (2) access
          to copy the Corresponding Source from a network server at no
          charge.

       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
          alternative is allowed only occasionally and noncommercially,
          and only if you received the object code with such an offer,
          in accord with subsection 6b.

       d. Convey the object code by offering access from a designated
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
          place at no further charge.  You need not require recipients
          to copy the Corresponding Source along with the object code.
          If the place to copy the object code is a network server, the
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
          Regardless of what server hosts the Corresponding Source, you
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.

       e. Convey the object code using peer-to-peer transmission,
          provided you inform other peers where the object code and
          Corresponding Source of the work are being offered to the
          general public at no charge under subsection 6d.


     A separable portion of the object code, whose source code is
     excluded from the Corresponding Source as a System Library, need
     not be included in conveying the object code work.

     A "User Product" is either (1) a "consumer product", which means
     any tangible personal property which is normally used for personal,
     family, or household purposes, or (2) anything designed or sold for
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
     coverage.  For a particular product received by a particular user,
     "normally used" refers to a typical or common use of that class of
     product, regardless of the status of the particular user or of the
     way in which the particular user actually uses, or expects or is
     expected to use, the product.  A product is a consumer product
     regardless of whether the product has substantial commercial,
     industrial or non-consumer uses, unless such uses represent the
     only significant mode of use of the product.

     "Installation Information" for a User Product means any methods,
     procedures, authorization keys, or other information required to
     install and execute modified versions of a covered work in that
     User Product from a modified version of its Corresponding Source.
     The information must suffice to ensure that the continued
     functioning of the modified object code is in no case prevented or
     interfered with solely because modification has been made.

     If you convey an object code work under this section in, or with,
     or specifically for use in, a User Product, and the conveying
     occurs as part of a transaction in which the right of possession
     and use of the User Product is transferred to the recipient in
     perpetuity or for a fixed term (regardless of how the transaction
     is characterized), the Corresponding Source conveyed under this
     section must be accompanied by the Installation Information.  But
     this requirement does not apply if neither you nor any third party
     retains the ability to install modified object code on the User
     Product (for example, the work has been installed in ROM).

     The requirement to provide Installation Information does not
     include a requirement to continue to provide support service,
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
     communication across the network.

     Corresponding Source conveyed, and Installation Information
     provided, in accord with this section must be in a format that is
     publicly documented (and with an implementation available to the
     public in source code form), and must require no special password
     or key for unpacking, reading or copying.

  7. Additional Terms.

     "Additional permissions" are terms that supplement the terms of
     this License by making exceptions from one or more of its
     conditions.  Additional permissions that are applicable to the
     entire Program shall be treated as though they were included in
     this License, to the extent that they are valid under applicable
     law.  If additional permissions apply only to part of the Program,
     that part may be used separately under those permissions, but the
     entire Program remains governed by this License without regard to
     the additional permissions.

     When you convey a copy of a covered work, you may at your option
     remove any additional permissions from that copy, or from any part
     of it.  (Additional permissions may be written to require their own
     removal in certain cases when you modify the work.)  You may place
     additional permissions on material, added by you to a covered work,
     for which you have or can give appropriate copyright permission.

     Notwithstanding any other provision of this License, for material
     you add to a covered work, you may (if authorized by the copyright
     holders of that material) supplement the terms of this License
     with terms:

       a. Disclaiming warranty or limiting liability differently from
          the terms of sections 15 and 16 of this License; or

       b. Requiring preservation of specified reasonable legal notices
          or author attributions in that material or in the Appropriate
          Legal Notices displayed by works containing it; or

       c. Prohibiting misrepresentation of the origin of that material,
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or

       d. Limiting the use for publicity purposes of names of licensors
          or authors of the material; or

       e. Declining to grant rights under trademark law for use of some
          trade names, trademarks, or service marks; or

       f. Requiring indemnification of licensors and authors of that
          material by anyone who conveys the material (or modified
          versions of it) with contractual assumptions of liability to
          the recipient, for any liability that these contractual
          assumptions directly impose on those licensors and authors.

     All other non-permissive additional terms are considered "further
     restrictions" within the meaning of section 10.  If the Program as
     you received it, or any part of it, contains a notice stating that
     it is governed by this License along with a term that is a further
     restriction, you may remove that term.  If a license document
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.

     If you add terms to a covered work in accord with this section, you
     must place, in the relevant source files, a statement of the
     additional terms that apply to those files, or a notice indicating
     where to find the applicable terms.

     Additional terms, permissive or non-permissive, may be stated in
     the form of a separately written license, or stated as exceptions;
     the above requirements apply either way.

  8. Termination.

     You may not propagate or modify a covered work except as expressly
     provided under this License.  Any attempt otherwise to propagate or
     modify it is void, and will automatically terminate your rights
     under this License (including any patent licenses granted under
     the third paragraph of section 11).

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.

  9. Acceptance Not Required for Having Copies.

     You are not required to accept this License in order to receive or
     run a copy of the Program.  Ancillary propagation of a covered work
     occurring solely as a consequence of using peer-to-peer
     transmission to receive a copy likewise does not require
     acceptance.  However, nothing other than this License grants you
     permission to propagate or modify any covered work.  These actions
     infringe copyright if you do not accept this License.  Therefore,
     by modifying or propagating a covered work, you indicate your
     acceptance of this License to do so.

 10. Automatic Licensing of Downstream Recipients.

     Each time you convey a covered work, the recipient automatically
     receives a license from the original licensors, to run, modify and
     propagate that work, subject to this License.  You are not
     responsible for enforcing compliance by third parties with this
     License.

     An "entity transaction" is a transaction transferring control of an
     organization, or substantially all assets of one, or subdividing an
     organization, or merging organizations.  If propagation of a
     covered work results from an entity transaction, each party to that
     transaction who receives a copy of the work also receives whatever
     licenses to the work the party's predecessor in interest had or
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.

     You may not impose any further restrictions on the exercise of the
     rights granted or affirmed under this License.  For example, you
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.

 11. Patents.

     A "contributor" is a copyright holder who authorizes use under this
     License of the Program or a work on which the Program is based.
     The work thus licensed is called the contributor's "contributor
     version".

     A contributor's "essential patent claims" are all patent claims
     owned or controlled by the contributor, whether already acquired or
     hereafter acquired, that would be infringed by some manner,
     permitted by this License, of making, using, or selling its
     contributor version, but do not include claims that would be
     infringed only as a consequence of further modification of the
     contributor version.  For purposes of this definition, "control"
     includes the right to grant patent sublicenses in a manner
     consistent with the requirements of this License.

     Each contributor grants you a non-exclusive, worldwide,
     royalty-free patent license under the contributor's essential
     patent claims, to make, use, sell, offer for sale, import and
     otherwise run, modify and propagate the contents of its
     contributor version.

     In the following three paragraphs, a "patent license" is any
     express agreement or commitment, however denominated, not to
     enforce a patent (such as an express permission to practice a
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.

     If you convey a covered work, knowingly relying on a patent
     license, and the Corresponding Source of the work is not available
     for anyone to copy, free of charge and under the terms of this
     License, through a publicly available network server or other
     readily accessible means, then you must either (1) cause the
     Corresponding Source to be so available, or (2) arrange to deprive
     yourself of the benefit of the patent license for this particular
     work, or (3) arrange, in a manner consistent with the requirements
     of this License, to extend the patent license to downstream
     recipients.  "Knowingly relying" means you have actual knowledge
     that, but for the patent license, your conveying the covered work
     in a country, or your recipient's use of the covered work in a
     country, would infringe one or more identifiable patents in that
     country that you have reason to believe are valid.

     If, pursuant to or in connection with a single transaction or
     arrangement, you convey, or propagate by procuring conveyance of, a
     covered work, and grant a patent license to some of the parties
     receiving the covered work authorizing them to use, propagate,
     modify or convey a specific copy of the covered work, then the
     patent license you grant is automatically extended to all
     recipients of the covered work and works based on it.

     A patent license is "discriminatory" if it does not include within
     the scope of its coverage, prohibits the exercise of, or is
     conditioned on the non-exercise of one or more of the rights that
     are specifically granted under this License.  You may not convey a
     covered work if you are a party to an arrangement with a third
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.

     Nothing in this License shall be construed as excluding or limiting
     any implied license or other defenses to infringement that may
     otherwise be available to you under applicable patent law.

 12. No Surrender of Others' Freedom.

     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.

 13. Use with the GNU Affero General Public License.

     Notwithstanding any other provision of this License, you have
     permission to link or combine any covered work with a work licensed
     under version 3 of the GNU Affero General Public License into a
     single combined work, and to convey the resulting work.  The terms
     of this License will continue to apply to the part which is the
     covered work, but the special requirements of the GNU Affero
     General Public License, section 13, concerning interaction through
     a network will apply to the combination as such.

 14. Revised Versions of this License.

     The Free Software Foundation may publish revised and/or new
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.

     Each version is given a distinguishing version number.  If the
     Program specifies that a certain numbered version of the GNU
     General Public License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.

     If the Program specifies that a proxy can decide which future
     versions of the GNU General Public License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Program.

     Later license versions may give you additional or different
     permissions.  However, no additional obligations are imposed on any
     author or copyright holder as a result of your choosing to follow a
     later version.

 15. Disclaimer of Warranty.

     THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
     COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
     RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
     SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
     NECESSARY SERVICING, REPAIR OR CORRECTION.

 16. Limitation of Liability.

     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
     CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
     THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
     BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
     PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
     THE POSSIBILITY OF SUCH DAMAGES.

 17. Interpretation of Sections 15 and 16.

     If the disclaimer of warranty and limitation of liability provided
     above cannot be given local legal effect according to their terms,
     reviewing courts shall apply local law that most closely
     approximates an absolute waiver of all civil liability in
     connection with the Program, unless a warranty or assumption of
     liability accompanies a copy of the Program in return for a fee.


END OF TERMS AND CONDITIONS
===========================

How to Apply These Terms to Your New Programs
=============================================

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

   To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

     ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
     Copyright (C) YEAR NAME OF AUTHOR

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 3 of the License, or (at
     your option) any later version.

     This program is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see `http://www.gnu.org/licenses/'.

   Also add information on how to contact you by electronic and paper
mail.

   If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

     PROGRAM Copyright (C) YEAR NAME OF AUTHOR
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.

   The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License.  Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".

   You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  For more information on this, and how to apply and follow
the GNU GPL, see `http://www.gnu.org/licenses/'.

   The GNU General Public License does not permit incorporating your
program into proprietary programs.  If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library.  If this is what you want to do, use the
GNU Lesser General Public License instead of this License.  But first,
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.


File: emacs,  Node: GNU Free Documentation License,  Next: Emacs Invocation,  Prev: Copying,  Up: Top

Appendix B GNU Free Documentation License
*****************************************

                     Version 1.3, 3 November 2008

     Copyright (C) 2000, 2001, 2002, 2007, 2008, 2009 Free Software Foundation, Inc.
     `http://fsf.org/'

     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

  0. PREAMBLE

     The purpose of this License is to make a manual, textbook, or other
     functional and useful document "free" in the sense of freedom: to
     assure everyone the effective freedom to copy and redistribute it,
     with or without modifying it, either commercially or
     noncommercially.  Secondarily, this License preserves for the
     author and publisher a way to get credit for their work, while not
     being considered responsible for modifications made by others.

     This License is a kind of "copyleft", which means that derivative
     works of the document must themselves be free in the same sense.
     It complements the GNU General Public License, which is a copyleft
     license designed for free software.

     We have designed this License in order to use it for manuals for
     free software, because free software needs free documentation: a
     free program should come with manuals providing the same freedoms
     that the software does.  But this License is not limited to
     software manuals; it can be used for any textual work, regardless
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
     instruction or reference.

  1. APPLICABILITY AND DEFINITIONS

     This License applies to any manual or other work, in any medium,
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
     grants a world-wide, royalty-free license, unlimited in duration,
     to use that work under the conditions stated herein.  The
     "Document", below, refers to any such manual or work.  Any member
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.

     A "Modified Version" of the Document means any work containing the
     Document or a portion of it, either copied verbatim, or with
     modifications and/or translated into another language.

     A "Secondary Section" is a named appendix or a front-matter section
     of the Document that deals exclusively with the relationship of the
     publishers or authors of the Document to the Document's overall
     subject (or to related matters) and contains nothing that could
     fall directly within that overall subject.  (Thus, if the Document
     is in part a textbook of mathematics, a Secondary Section may not
     explain any mathematics.)  The relationship could be a matter of
     historical connection with the subject or with related matters, or
     of legal, commercial, philosophical, ethical or political position
     regarding them.

     The "Invariant Sections" are certain Secondary Sections whose
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.

     The "Cover Texts" are certain short passages of text that are
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
     that says that the Document is released under this License.  A
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
     be at most 25 words.

     A "Transparent" copy of the Document means a machine-readable copy,
     represented in a format whose specification is available to the
     general public, that is suitable for revising the document
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".

     Examples of suitable formats for Transparent copies include plain
     ASCII without markup, Texinfo input format, LaTeX input format,
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.

     The "Title Page" means, for a printed book, the title page itself,
     plus such following pages as are needed to hold, legibly, the
     material this License requires to appear in the title page.  For
     works in formats which do not have any title page as such, "Title
     Page" means the text near the most prominent appearance of the
     work's title, preceding the beginning of the body of the text.

     The "publisher" means any person or entity that distributes copies
     of the Document to the public.

     A section "Entitled XYZ" means a named subunit of the Document
     whose title either is precisely XYZ or contains XYZ in parentheses
     following text that translates XYZ in another language.  (Here XYZ
     stands for a specific section name mentioned below, such as
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
     To "Preserve the Title" of such a section when you modify the
     Document means that it remains a section "Entitled XYZ" according
     to this definition.

     The Document may include Warranty Disclaimers next to the notice
     which states that this License applies to the Document.  These
     Warranty Disclaimers are considered to be included by reference in
     this License, but only as regards disclaiming warranties: any other
     implication that these Warranty Disclaimers may have is void and
     has no effect on the meaning of this License.

  2. VERBATIM COPYING

     You may copy and distribute the Document in any medium, either
     commercially or noncommercially, provided that this License, the
     copyright notices, and the license notice saying this License
     applies to the Document are reproduced in all copies, and that you
     add no other conditions whatsoever to those of this License.  You
     may not use technical measures to obstruct or control the reading
     or further copying of the copies you make or distribute.  However,
     you may accept compensation in exchange for copies.  If you
     distribute a large enough number of copies you must also follow
     the conditions in section 3.

     You may also lend copies, under the same conditions stated above,
     and you may publicly display copies.

  3. COPYING IN QUANTITY

     If you publish printed copies (or copies in media that commonly
     have printed covers) of the Document, numbering more than 100, and
     the Document's license notice requires Cover Texts, you must
     enclose the copies in covers that carry, clearly and legibly, all
     these Cover Texts: Front-Cover Texts on the front cover, and
     Back-Cover Texts on the back cover.  Both covers must also clearly
     and legibly identify you as the publisher of these copies.  The
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.

     If the required texts for either cover are too voluminous to fit
     legibly, you should put the first ones listed (as many as fit
     reasonably) on the actual cover, and continue the rest onto
     adjacent pages.

     If you publish or distribute Opaque copies of the Document
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.

     It is requested, but not required, that you contact the authors of
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.

  4. MODIFICATIONS

     You may copy and distribute a Modified Version of the Document
     under the conditions of sections 2 and 3 above, provided that you
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:

       A. Use in the Title Page (and on the covers, if any) a title
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.

       B. List on the Title Page, as authors, one or more persons or
          entities responsible for authorship of the modifications in
          the Modified Version, together with at least five of the
          principal authors of the Document (all of its principal
          authors, if it has fewer than five), unless they release you
          from this requirement.

       C. State on the Title page the name of the publisher of the
          Modified Version, as the publisher.

       D. Preserve all the copyright notices of the Document.

       E. Add an appropriate copyright notice for your modifications
          adjacent to the other copyright notices.

       F. Include, immediately after the copyright notices, a license
          notice giving the public permission to use the Modified
          Version under the terms of this License, in the form shown in
          the Addendum below.

       G. Preserve in that license notice the full lists of Invariant
          Sections and required Cover Texts given in the Document's
          license notice.

       H. Include an unaltered copy of this License.

       I. Preserve the section Entitled "History", Preserve its Title,
          and add to it an item stating at least the title, year, new
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.

       J. Preserve the network location, if any, given in the Document
          for public access to a Transparent copy of the Document, and
          likewise the network locations given in the Document for
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.

       K. For any section Entitled "Acknowledgements" or "Dedications",
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
          acknowledgements and/or dedications given therein.

       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.

       M. Delete any section Entitled "Endorsements".  Such a section
          may not be included in the Modified Version.

       N. Do not retitle any existing section to be Entitled
          "Endorsements" or to conflict in title with any Invariant
          Section.

       O. Preserve any Warranty Disclaimers.

     If the Modified Version includes new front-matter sections or
     appendices that qualify as Secondary Sections and contain no
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.

     You may add a section Entitled "Endorsements", provided it contains
     nothing but endorsements of your Modified Version by various
     parties--for example, statements of peer review or that the text
     has been approved by an organization as the authoritative
     definition of a standard.

     You may add a passage of up to five words as a Front-Cover Text,
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.

     The author(s) and publisher(s) of the Document do not by this
     License give permission to use their names for publicity for or to
     assert or imply endorsement of any Modified Version.

  5. COMBINING DOCUMENTS

     You may combine the Document with other documents released under
     this License, under the terms defined in section 4 above for
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
     unmodified, and list them all as Invariant Sections of your
     combined work in its license notice, and that you preserve all
     their Warranty Disclaimers.

     The combined work need only contain one copy of this License, and
     multiple identical Invariant Sections may be replaced with a single
     copy.  If there are multiple Invariant Sections with the same name
     but different contents, make the title of each such section unique
     by adding at the end of it, in parentheses, the name of the
     original author or publisher of that section if known, or else a
     unique number.  Make the same adjustment to the section titles in
     the list of Invariant Sections in the license notice of the
     combined work.

     In the combination, you must combine any sections Entitled
     "History" in the various original documents, forming one section
     Entitled "History"; likewise combine any sections Entitled
     "Acknowledgements", and any sections Entitled "Dedications".  You
     must delete all sections Entitled "Endorsements."

  6. COLLECTIONS OF DOCUMENTS

     You may make a collection consisting of the Document and other
     documents released under this License, and replace the individual
     copies of this License in the various documents with a single copy
     that is included in the collection, provided that you follow the
     rules of this License for verbatim copying of each of the
     documents in all other respects.

     You may extract a single document from such a collection, and
     distribute it individually under this License, provided you insert
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.

  7. AGGREGATION WITH INDEPENDENT WORKS

     A compilation of the Document or its derivatives with other
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
     copyright resulting from the compilation is not used to limit the
     legal rights of the compilation's users beyond what the individual
     works permit.  When the Document is included in an aggregate, this
     License does not apply to the other works in the aggregate which
     are not themselves derivative works of the Document.

     If the Cover Text requirement of section 3 is applicable to these
     copies of the Document, then if the Document is less than one half
     of the entire aggregate, the Document's Cover Texts may be placed
     on covers that bracket the Document within the aggregate, or the
     electronic equivalent of covers if the Document is in electronic
     form.  Otherwise they must appear on printed covers that bracket
     the whole aggregate.

  8. TRANSLATION

     Translation is considered a kind of modification, so you may
     distribute translations of the Document under the terms of section
     4.  Replacing Invariant Sections with translations requires special
     permission from their copyright holders, but you may include
     translations of some or all Invariant Sections in addition to the
     original versions of these Invariant Sections.  You may include a
     translation of this License, and all the license notices in the
     Document, and any Warranty Disclaimers, provided that you also
     include the original English version of this License and the
     original versions of those notices and disclaimers.  In case of a
     disagreement between the translation and the original version of
     this License or a notice or disclaimer, the original version will
     prevail.

     If a section in the Document is Entitled "Acknowledgements",
     "Dedications", or "History", the requirement (section 4) to
     Preserve its Title (section 1) will typically require changing the
     actual title.

  9. TERMINATION

     You may not copy, modify, sublicense, or distribute the Document
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense, or distribute it is void,
     and will automatically terminate your rights under this License.

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.

 10. FUTURE REVISIONS OF THIS LICENSE

     The Free Software Foundation may publish new, revised versions of
     the GNU Free Documentation License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.  See
     `http://www.gnu.org/copyleft/'.

     Each version of the License is given a distinguishing version
     number.  If the Document specifies that a particular numbered
     version of this License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that specified version or of any later version that has been
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Document.

 11. RELICENSING

     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
     World Wide Web server that publishes copyrightable works and also
     provides prominent facilities for anybody to edit those works.  A
     public wiki that anybody can edit is an example of such a server.
     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
     site means any set of copyrightable works thus published on the MMC
     site.

     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
     license published by Creative Commons Corporation, a not-for-profit
     corporation with a principal place of business in San Francisco,
     California, as well as future copyleft versions of that license
     published by that same organization.

     "Incorporate" means to publish or republish a Document, in whole or
     in part, as part of another Document.

     An MMC is "eligible for relicensing" if it is licensed under this
     License, and if all works that were first published under this
     License somewhere other than this MMC, and subsequently
     incorporated in whole or in part into the MMC, (1) had no cover
     texts or invariant sections, and (2) were thus incorporated prior
     to November 1, 2008.

     The operator of an MMC Site may republish an MMC contained in the
     site under CC-BY-SA on the same site at any time before August 1,
     2009, provided the MMC is eligible for relicensing.


ADDENDUM: How to use this License for your documents
====================================================

To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:

       Copyright (C)  YEAR  YOUR NAME.
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.3
       or any later version published by the Free Software Foundation;
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
       Texts.  A copy of the license is included in the section entitled ``GNU
       Free Documentation License''.

   If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this:

         with the Invariant Sections being LIST THEIR TITLES, with
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
         being LIST.

   If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.

   If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.


File: emacs,  Node: Emacs Invocation,  Next: X Resources,  Prev: GNU Free Documentation License,  Up: Top

Appendix C Command Line Arguments for Emacs Invocation
******************************************************

Emacs supports command line arguments to request various actions when
invoking Emacs.  These are for compatibility with other editors and for
sophisticated activities.  We don't recommend using them for ordinary
editing (*Note Emacs Server::, for a way to access an existing Emacs
job from the command line).

   Arguments starting with `-' are "options", and so is `+LINENUM'.
All other arguments specify files to visit.  Emacs visits the specified
files while it starts up.  The last file specified on the command line
becomes the current buffer; the other files are also visited in other
buffers.  As with most programs, the special argument `--' says that
all subsequent arguments are file names, not options, even if they
start with `-'.

   Emacs command options can specify many things, such as the size and
position of the X window Emacs uses, its colors, and so on.  A few
options support advanced usage, such as running Lisp functions on files
in batch mode.  The sections of this chapter describe the available
options, arranged according to their purpose.

   There are two ways of writing options: the short forms that start
with a single `-', and the long forms that start with `--'.  For
example, `-d' is a short form and `--display' is the corresponding long
form.

   The long forms with `--' are easier to remember, but longer to type.
However, you don't have to spell out the whole option name; any
unambiguous abbreviation is enough.  When a long option takes an
argument, you can use either a space or an equal sign to separate the
option name and the argument.  Thus, you can write either `--display
sugar-bombs:0.0' or `--display=sugar-bombs:0.0'.  We recommend an equal
sign because it makes the relationship clearer, and the tables below
always show an equal sign.

   Most options specify how to initialize Emacs, or set parameters for
the Emacs session.  We call them "initial options".  A few options
specify things to do, such as loading libraries or calling Lisp
functions.  These are called "action options".  These and file names
together are called "action arguments".  The action arguments are
stored as a list of strings in the variable `command-line-args'.
(Actually, when Emacs starts up, `command-line-args' contains all the
arguments passed from the command line; during initialization, the
initial arguments are removed from this list when they are processed,
leaving only the action arguments.)

* Menu:

* Action Arguments::    Arguments to visit files, load libraries,
                          and call functions.
* Initial Options::     Arguments that take effect while starting Emacs.
* Command Example::     Examples of using command line arguments.
* Environment::         Environment variables that Emacs uses.
* Display X::           Changing the default display and using remote login.
* Font X::              Choosing a font for text, under X.
* Colors X::            Choosing display colors.
* Window Size X::       Start-up window size, under X.
* Borders X::           Internal and external borders, under X.
* Title X::             Specifying the initial frame's title.
* Icons X::             Choosing what sort of icon to use, under X.
* Misc X::              Other display options.


File: emacs,  Node: Action Arguments,  Next: Initial Options,  Up: Emacs Invocation

C.1 Action Arguments
====================

Here is a table of action arguments:

`FILE'
`--file=FILE'
`--find-file=FILE'
`--visit=FILE'
     Visit FILE using `find-file'.  *Note Visiting::.

     When Emacs starts up, it displays the startup buffer in one window,
     and the buffer visiting FILE in another window (*note Windows::).
     If you supply more than one file argument, the displayed file is
     the last one specified on the command line; the other files are
     visited but their buffers are not shown.

     If the startup buffer is disabled (*note Entering Emacs::), then
     FILE is visited in a single window if one file argument was
     supplied; with two file arguments, Emacs displays the files in two
     different windows; with more than two file argument, Emacs displays
     the last file specified in one window, plus a Buffer Menu in a
     different window (*note Several Buffers::).  To inhibit using the
     Buffer Menu for this, change the variable
     `inhibit-startup-buffer-menu' to `t'.

`+LINENUM FILE'
     Visit FILE using `find-file', then go to line number LINENUM in it.

`+LINENUM:COLUMNNUM FILE'
     Visit FILE using `find-file', then go to line number LINENUM and
     put point at column number COLUMNNUM.

`-l FILE'
`--load=FILE'
     Load a Lisp library named FILE with the function `load'.  If FILE
     is not an absolute file name, Emacs first looks for it in the
     current directory, then in the directories listed in `load-path'
     (*note Lisp Libraries::).

     *Warning:* If previous command-line arguments have visited files,
     the current directory is the directory of the last file visited.

`-L DIR'
`--directory=DIR'
     Add directory DIR to the variable `load-path'.

`-f FUNCTION'
`--funcall=FUNCTION'
     Call Lisp function FUNCTION.  If it is an interactive function (a
     command), it reads the arguments interactively just as if you had
     called the same function with a key sequence.  Otherwise, it calls
     the function with no arguments.

`--eval=EXPRESSION'
`--execute=EXPRESSION'
     Evaluate Lisp expression EXPRESSION.

`--insert=FILE'
     Insert the contents of FILE into the `*scratch*' buffer (*note
     Lisp Interaction::).  This is like what `M-x insert-file' does
     (*note Misc File Ops::).

`--kill'
     Exit from Emacs without asking for confirmation.

`--help'
     Print a usage message listing all available options, then exit
     successfully.

`--version'
     Print Emacs version, then exit successfully.


File: emacs,  Node: Initial Options,  Next: Command Example,  Prev: Action Arguments,  Up: Emacs Invocation

C.2 Initial Options
===================

The initial options specify parameters for the Emacs session.  This
section describes the more general initial options; some other options
specifically related to the X Window System appear in the following
sections.

   Some initial options affect the loading of the initialization file.
Normally, Emacs first loads `site-start.el' if it exists, then your own
initialization file if it exists, and finally the default
initialization file `default.el' if it exists (*note Init File::).
Certain options prevent loading of some of these files or substitute
other files for them.

`-chdir DIRECTORY'
`--chdir=DIRECTORY'
     Change to DIRECTORY before doing anything else.  This is mainly
     used by session management in X so that Emacs starts in the same
     directory as it stopped.  This makes desktop saving and restoring
     easier.

`-t DEVICE'
`--terminal=DEVICE'
     Use DEVICE as the device for terminal input and output.  This
     option implies `--no-window-system'.

`-d DISPLAY'
`--display=DISPLAY'
     Use the X Window System and use the display named DISPLAY to open
     the initial Emacs frame.  *Note Display X::, for more details.

`-nw'
`--no-window-system'
     Don't communicate directly with the window system, disregarding the
     `DISPLAY' environment variable even if it is set.  This means that
     Emacs uses the terminal from which it was launched for all its
     display and input.

`-batch'
`--batch'
     Run Emacs in "batch mode".  Batch mode is used for running
     programs written in Emacs Lisp from shell scripts, makefiles, and
     so on.  To invoke a Lisp program, use the `-batch' option in
     conjunction with one or more of `-l', `-f' or `--eval' (*note
     Action Arguments::).  *Note Command Example::, for an example.

     In batch mode, Emacs does not display the text being edited, and
     the standard terminal interrupt characters such as `C-z' and `C-c'
     have their usual effect.  Emacs functions that normally print a
     message in the echo area will print to either the standard output
     stream (`stdout') or the standard error stream (`stderr') instead.
     (To be precise, functions like `prin1', `princ' and `print' print
     to `stdout', while `message' and `error' print to `stderr'.)
     Functions that normally read keyboard input from the minibuffer
     take their input from the terminal's standard input stream
     (`stdin') instead.

     `--batch' implies `-q' (do not load an initialization file), but
     `site-start.el' is loaded nonetheless.  It also causes Emacs to
     exit after processing all the command options.  In addition, it
     disables auto-saving except in buffers for which auto-saving is
     explicitly requested.

`--script FILE'
     Run Emacs in batch mode, like `--batch', and then read and execute
     the Lisp code in FILE.

     The normal use of this option is in executable script files that
     run Emacs.  They can start with this text on the first line

          #!/usr/bin/emacs --script

     which will invoke Emacs with `--script' and supply the name of the
     script file as FILE.  Emacs Lisp then treats the `#!' on this
     first line as a comment delimiter.

`-q'
`--no-init-file'
     Do not load any initialization file (*note Init File::).  When
     Emacs is invoked with this option, the Customize facility does not
     allow options to be saved (*note Easy Customization::).  This
     option does not disable loading `site-start.el'.

`--no-site-file'
     Do not load `site-start.el' (*note Init File::).  The `-Q' option
     does this too, but other options like `-q' do not.

`--no-site-lisp'
     Do not include the `site-lisp' directories in `load-path' (*note
     Init File::).  The `-Q' option does this too.

`--no-splash'
     Do not display a startup screen.  You can also achieve this effect
     by setting the variable `inhibit-startup-screen' to non-`nil' in
     your initialization file (*note Entering Emacs::).

`-Q'
`--quick'
     Start emacs with minimum customizations.  This is similar to using
     `-q', `--no-site-file', `--no-site-lisp', and `--no-splash'
     together.  This also stops Emacs from processing X resources by
     setting `inhibit-x-resources' to `t' (*note Resources::).

`-daemon'
`--daemon'
     Start Emacs as a daemon--after Emacs starts up, it starts the Emacs
     server and disconnects from the terminal without opening any
     frames.  You can then use the `emacsclient' command to connect to
     Emacs for editing.  *Note Emacs Server::, for information about
     using Emacs as a daemon.

`-daemon=SERVER-NAME'
     Start emacs in background as a daemon, and use SERVER-NAME as the
     server name.

`--no-desktop'
     Do not reload any saved desktop.  *Note Saving Emacs Sessions::.

`-u USER'
`--user=USER'
     Load USER's initialization file instead of your own(1).

`--debug-init'
     Enable the Emacs Lisp debugger for errors in the init file.  *Note
     Entering the Debugger on an Error: (elisp)Error Debugging.

   ---------- Footnotes ----------

   (1) This option has no effect on MS-Windows.


File: emacs,  Node: Command Example,  Next: Environment,  Prev: Initial Options,  Up: Emacs Invocation

C.3 Command Argument Example
============================

Here is an example of using Emacs with arguments and options.  It
assumes you have a Lisp program file called `hack-c.el' which, when
loaded, performs some useful operation on the current buffer, expected
to be a C program.

     emacs --batch foo.c -l hack-c -f save-buffer >& log

This says to visit `foo.c', load `hack-c.el' (which makes changes in
the visited file), save `foo.c' (note that `save-buffer' is the
function that `C-x C-s' is bound to), and then exit back to the shell
(because of `--batch').  `--batch' also guarantees there will be no
problem redirecting output to `log', because Emacs will not assume that
it has a display terminal to work with.


File: emacs,  Node: Environment,  Next: Display X,  Prev: Command Example,  Up: Emacs Invocation

C.4 Environment Variables
=========================

The "environment" is a feature of the operating system; it consists of
a collection of variables with names and values.  Each variable is
called an "environment variable"; environment variable names are
case-sensitive, and it is conventional to use upper case letters only.
The values are all text strings.

   What makes the environment useful is that subprocesses inherit the
environment automatically from their parent process.  This means you
can set up an environment variable in your login shell, and all the
programs you run (including Emacs) will automatically see it.
Subprocesses of Emacs (such as shells, compilers, and version control
programs) inherit the environment from Emacs, too.

   Inside Emacs, the command `M-x getenv' reads the name of an
environment variable, and prints its value in the echo area.  `M-x
setenv' sets a variable in the Emacs environment, and `C-u M-x setenv'
removes a variable.  (Environment variable substitutions with `$' work
in the value just as in file names; see *note File Names with $::.)
The variable `initial-environment' stores the initial environment
inherited by Emacs.

   The way to set environment variables outside of Emacs depends on the
operating system, and especially the shell that you are using.  For
example, here's how to set the environment variable `ORGANIZATION' to
`not very much' using Bash:

     export ORGANIZATION="not very much"

and here's how to do it in csh or tcsh:

     setenv ORGANIZATION "not very much"

   When Emacs is using the X Window System, various environment
variables that control X work for Emacs as well.  See the X
documentation for more information.

* Menu:

* General Variables::   Environment variables that all versions of Emacs use.
* Misc Variables::      Certain system-specific variables.
* MS-Windows Registry:: An alternative to the environment on MS-Windows.


File: emacs,  Node: General Variables,  Next: Misc Variables,  Up: Environment

C.4.1 General Variables
-----------------------

Here is an alphabetical list of environment variables that have special
meanings in Emacs.  Most of these variables are also used by some other
programs.  Emacs does not require any of these environment variables to
be set, but it uses their values if they are set.

`CDPATH'
     Used by the `cd' command to search for the directory you specify,
     when you specify a relative directory name.

`EMACSDATA'
     Directory for the architecture-independent files that come with
     Emacs.  This is used to initialize the variable `data-directory'.

`EMACSDOC'
     Directory for the documentation string file, which is used to
     initialize the Lisp variable `doc-directory'.

`EMACSLOADPATH'
     A colon-separated list of directories(1)  to search for Emacs Lisp
     files.  If set, it overrides the usual initial value of the
     `load-path' variable (*note Lisp Libraries::).

`EMACSPATH'
     A colon-separated list of directories to search for executable
     files.  If set, Emacs uses this in addition to `PATH' (see below)
     when initializing the variable `exec-path' (*note Shell::).

`EMAIL'
     Your email address; used to initialize the Lisp variable
     `user-mail-address', which the Emacs mail interface puts into the
     `From' header of outgoing messages (*note Mail Headers::).

`ESHELL'
     Used for shell-mode to override the `SHELL' environment variable
     (*note Interactive Shell::).

`HISTFILE'
     The name of the file that shell commands are saved in between
     logins.  This variable defaults to `~/.bash_history' if you use
     Bash, to `~/.sh_history' if you use ksh, and to `~/.history'
     otherwise.

`HOME'
     The location of your files in the directory tree; used for
     expansion of file names starting with a tilde (`~').  On MS-DOS,
     it defaults to the directory from which Emacs was started, with
     `/bin' removed from the end if it was present.  On Windows, the
     default value of `HOME' is the `Application Data' subdirectory of
     the user profile directory (normally, this is `C:/Documents and
     Settings/USERNAME/Application Data', where USERNAME is your user
     name), though for backwards compatibility `C:/' will be used
     instead if a `.emacs' file is found there.

`HOSTNAME'
     The name of the machine that Emacs is running on.

`INCPATH'
     A colon-separated list of directories.  Used by the `complete'
     package to search for files.

`INFOPATH'
     A colon-separated list of directories in which to search for Info
     files.

`LC_ALL'
`LC_COLLATE'
`LC_CTYPE'
`LC_MESSAGES'
`LC_MONETARY'
`LC_NUMERIC'
`LC_TIME'
`LANG'
     The user's preferred locale.  The locale has six categories,
     specified by the environment variables `LC_COLLATE' for sorting,
     `LC_CTYPE' for character encoding, `LC_MESSAGES' for system
     messages, `LC_MONETARY' for monetary formats, `LC_NUMERIC' for
     numbers, and `LC_TIME' for dates and times.  If one of these
     variables is not set, the category defaults to the value of the
     `LANG' environment variable, or to the default `C' locale if
     `LANG' is not set.  But if `LC_ALL' is specified, it overrides the
     settings of all the other locale environment variables.

     On MS-Windows, if `LANG' is not already set in the environment
     when Emacs starts, Emacs sets it based on the system-wide default
     language, which you can set in the `Regional Settings' Control
     Panel on some versions of MS-Windows.

     The value of the `LC_CTYPE' category is matched against entries in
     `locale-language-names', `locale-charset-language-names', and
     `locale-preferred-coding-systems', to select a default language
     environment and coding system.  *Note Language Environments::.

`LOGNAME'
     The user's login name.  See also `USER'.

`MAIL'
     The name of your system mail inbox.

`MH'
     Name of setup file for the mh system.  *Note MH-E: (mh-e)Top.

`NAME'
     Your real-world name.  This is used to initialize the variable
     `user-full-name' (*note Mail Headers::).

`NNTPSERVER'
     The name of the news server.  Used by the mh and Gnus packages.

`ORGANIZATION'
     The name of the organization to which you belong.  Used for
     setting the `Organization:' header in your posts from the Gnus
     package.

`PATH'
     A colon-separated list of directories containing executable files.
     This is used to initialize the variable `exec-path' (*note
     Shell::).

`PWD'
     If set, this should be the default directory when Emacs was
     started.

`REPLYTO'
     If set, this specifies an initial value for the variable
     `mail-default-reply-to' (*note Mail Headers::).

`SAVEDIR'
     The name of a directory in which news articles are saved by
     default.  Used by the Gnus package.

`SHELL'
     The name of an interpreter used to parse and execute programs run
     from inside Emacs.

`SMTPSERVER'
     The name of the outgoing mail server.  This is used to initialize
     the variable `smtpmail-smtp-server' (*note Mail Sending::).  

`TERM'
     The type of the terminal that Emacs is using.  This variable must
     be set unless Emacs is run in batch mode.  On MS-DOS, it defaults
     to `internal', which specifies a built-in terminal emulation that
     handles the machine's own display.

`TERMCAP'
     The name of the termcap library file describing how to program the
     terminal specified by `TERM'.  This defaults to `/etc/termcap'.

`TMPDIR'
`TMP'
`TEMP'
     These environment variables are used to initialize the variable
     `temporary-file-directory', which specifies a directory in which
     to put temporary files (*note Backup::).  Emacs tries to use
     `TMPDIR' first; if that is unset, it tries `TMP', then `TEMP', and
     finally `/tmp'.  But on MS-Windows and MS-DOS, Emacs tries `TEMP',
     then `TMPDIR', then `TMP', and finally `c:/temp'.

`TZ'
     This specifies the current time zone and possibly also daylight
     saving time information.  On MS-DOS, if `TZ' is not set in the
     environment when Emacs starts, Emacs defines a default value as
     appropriate for the country code returned by DOS.  On MS-Windows,
     Emacs does not use `TZ' at all.

`USER'
     The user's login name.  See also `LOGNAME'.  On MS-DOS, this
     defaults to `root'.

`VERSION_CONTROL'
     Used to initialize the `version-control' variable (*note Backup
     Names::).

   ---------- Footnotes ----------

   (1)  Here and below, whenever we say "colon-separated list of
directories", it pertains to Unix and GNU/Linux systems.  On MS-DOS and
MS-Windows, the directories are separated by semi-colons instead, since
DOS/Windows file names might include a colon after a drive letter.


File: emacs,  Node: Misc Variables,  Next: MS-Windows Registry,  Prev: General Variables,  Up: Environment

C.4.2 Miscellaneous Variables
-----------------------------

These variables are used only on particular configurations:

`COMSPEC'
     On MS-DOS and MS-Windows, the name of the command interpreter to
     use when invoking batch files and commands internal to the shell.
     On MS-DOS this is also used to make a default value for the
     `SHELL' environment variable.

`NAME'
     On MS-DOS, this variable defaults to the value of the `USER'
     variable.

`EMACSTEST'
     On MS-DOS, this specifies a file to use to log the operation of the
     internal terminal emulator.  This feature is useful for submitting
     bug reports.

`EMACSCOLORS'
     On MS-DOS, this specifies the screen colors.  It is useful to set
     them this way, since otherwise Emacs would display the default
     colors momentarily when it starts up.

     The value of this variable should be the two-character encoding of
     the foreground (the first character) and the background (the second
     character) colors of the default face.  Each character should be
     the hexadecimal code for the desired color on a standard PC
     text-mode display.  For example, to get blue text on a light gray
     background, specify `EMACSCOLORS=17', since 1 is the code of the
     blue color and 7 is the code of the light gray color.

     The PC display usually supports only eight background colors.
     However, Emacs switches the DOS display to a mode where all 16
     colors can be used for the background, so all four bits of the
     background color are actually used.

`PRELOAD_WINSOCK'
     On MS-Windows, if you set this variable, Emacs will load and
     initialize the network library at startup, instead of waiting
     until the first time it is required.

`emacs_dir'
     On MS-Windows, `emacs_dir' is a special environment variable, which
     indicates the full path of the directory in which Emacs is
     installed.  If Emacs is installed in the standard directory
     structure, it calculates this value automatically.  It is not much
     use setting this variable yourself unless your installation is
     non-standard, since unlike other environment variables, it will be
     overridden by Emacs at startup.  When setting other environment
     variables, such as `EMACSLOADPATH', you may find it useful to use
     `emacs_dir' rather than hard-coding an absolute path.  This allows
     multiple versions of Emacs to share the same environment variable
     settings, and it allows you to move the Emacs installation
     directory, without changing any environment or registry settings.


File: emacs,  Node: MS-Windows Registry,  Prev: Misc Variables,  Up: Environment

C.4.3 The MS-Windows System Registry
------------------------------------

On MS-Windows, the installation program `addpm.exe' adds values for
`emacs_dir', `EMACSLOADPATH', `EMACSDATA', `EMACSPATH', `EMACSDOC',
`SHELL' and `TERM' to the `HKEY_LOCAL_MACHINE' section of the system
registry, under `/Software/GNU/Emacs'.  It does this because there is
no standard place to set environment variables across different
versions of Windows.  Running `addpm.exe' is no longer strictly
necessary in recent versions of Emacs, but if you are upgrading from an
older version, running `addpm.exe' ensures that you do not have older
registry entries from a previous installation, which may not be
compatible with the latest version of Emacs.

   When Emacs starts, as well as checking the environment, it also
checks the System Registry for those variables and for `HOME', `LANG'
and `PRELOAD_WINSOCK'.

   To determine the value of those variables, Emacs goes through the
following procedure.  First, the environment is checked.  If the
variable is not found there, Emacs looks for registry keys by that name
under `/Software/GNU/Emacs'; first in the `HKEY_CURRENT_USER' section
of the registry, and if not found there, in the `HKEY_LOCAL_MACHINE'
section.  Finally, if Emacs still cannot determine the values,
compiled-in defaults are used.

   In addition to the environment variables above, you can also add many
of the settings which on X belong in the `.Xdefaults' file (*note X
Resources::) to the `/Software/GNU/Emacs' registry key.


File: emacs,  Node: Display X,  Next: Font X,  Prev: Environment,  Up: Emacs Invocation

C.5 Specifying the Display Name
===============================

The environment variable `DISPLAY' tells all X clients, including
Emacs, where to display their windows.  Its value is set by default in
ordinary circumstances, when you start an X server and run jobs
locally.  You can specify the display yourself; one reason to do this
is if you want to log into another system and run Emacs there, and have
the window displayed at your local terminal.

   `DISPLAY' has the syntax `HOST:DISPLAY.SCREEN', where HOST is the
host name of the X Window System server machine, DISPLAY is an
arbitrarily-assigned number that distinguishes your server (X terminal)
from other servers on the same machine, and SCREEN is a field that
allows an X server to control multiple terminal screens.  The period
and the SCREEN field are optional.  If included, SCREEN is usually zero.

   For example, if your host is named `glasperle' and your server is
the first (or perhaps the only) server listed in the configuration, your
`DISPLAY' is `glasperle:0.0'.

   You can specify the display name explicitly when you run Emacs,
either by changing the `DISPLAY' variable, or with the option `-d
DISPLAY' or `--display=DISPLAY'.  Here is an example:

     emacs --display=glasperle:0 &

   You can inhibit the use of the X window system with the `-nw'
option.  Then Emacs uses its controlling text terminal for display.
*Note Initial Options::.

   Sometimes, security arrangements prevent a program on a remote system
from displaying on your local system.  In this case, trying to run Emacs
produces messages like this:

     Xlib:  connection to "glasperle:0.0" refused by server

You might be able to overcome this problem by using the `xhost' command
on the local system to give permission for access from your remote
machine.


File: emacs,  Node: Font X,  Next: Colors X,  Prev: Display X,  Up: Emacs Invocation

C.6 Font Specification Options
==============================

You can use the command line option `-fn FONT' (or `--font', which is
an alias for `-fn') to specify a default font:

`-fn FONT'
`--font=FONT'
     Use FONT as the default font.

   When passing a font name to Emacs on the command line, you may need
to "quote" it, by enclosing it in quotation marks, if it contains
characters that the shell treats specially (e.g. spaces).  For example:

     emacs -fn "DejaVu Sans Mono-12"

   *Note Fonts::, for details about font names and other ways to specify
the default font.


File: emacs,  Node: Colors X,  Next: Window Size X,  Prev: Font X,  Up: Emacs Invocation

C.7 Window Color Options
========================

You can use the following command-line options to specify the colors to
use for various parts of the Emacs display.  Colors may be specified
using either color names or RGB triplets (*note Colors::).

`-fg COLOR'
`--foreground-color=COLOR'
     Specify the foreground color, overriding the color specified by the
     `default' face (*note Faces::).

`-bg COLOR'
`--background-color=COLOR'
     Specify the background color, overriding the color specified by the
     `default' face.

`-bd COLOR'
`--border-color=COLOR'
     Specify the color of the border of the X window.  This has no
     effect if Emacs is compiled with GTK+ support.

`-cr COLOR'
`--cursor-color=COLOR'
     Specify the color of the Emacs cursor which indicates where point
     is.

`-ms COLOR'
`--mouse-color=COLOR'
     Specify the color for the mouse cursor when the mouse is in the
     Emacs window.

`-r'
`-rv'
`--reverse-video'
     Reverse video--swap the foreground and background colors.

`--color=MODE'
     Set the "color support mode" when Emacs is run on a text terminal.
     This option overrides the number of supported colors that the
     character terminal advertises in its `termcap' or `terminfo'
     database.  The parameter MODE can be one of the following:
    `never'
    `no'
          Don't use colors even if the terminal's capabilities specify
          color support.

    `default'
    `auto'
          Same as when `--color' is not used at all: Emacs detects at
          startup whether the terminal supports colors, and if it does,
          turns on colored display.

    `always'
    `yes'
    `ansi8'
          Turn on the color support unconditionally, and use color
          commands specified by the ANSI escape sequences for the 8
          standard colors.

    `NUM'
          Use color mode for NUM colors.  If NUM is -1, turn off color
          support (equivalent to `never'); if it is 0, use the default
          color support for this terminal (equivalent to `auto');
          otherwise use an appropriate standard mode for NUM colors.
          Depending on your terminal's capabilities, Emacs might be
          able to turn on a color mode for 8, 16, 88, or 256 as the
          value of NUM.  If there is no mode that supports NUM colors,
          Emacs acts as if NUM were 0, i.e. it uses the terminal's
          default color support mode.
     If MODE is omitted, it defaults to ANSI8.

   For example, to use a coral mouse cursor and a slate blue text
cursor, enter:

     emacs -ms coral -cr 'slate blue' &

   You can reverse the foreground and background colors through the
`-rv' option or with the X resource `reverseVideo'.

   The `-fg', `-bg', and `-rv' options function on text terminals as
well as on graphical displays.


File: emacs,  Node: Window Size X,  Next: Borders X,  Prev: Colors X,  Up: Emacs Invocation

C.8 Options for Window Size and Position
========================================

Here is a list of the command-line options for specifying size and
position of the initial Emacs frame:

`-g WIDTHxHEIGHT[{+-}XOFFSET{+-}YOFFSET]]'
`--geometry=WIDTHxHEIGHT[{+-}XOFFSET{+-}YOFFSET]]'
     Specify the size WIDTH and HEIGHT (measured in character columns
     and lines), and positions XOFFSET and YOFFSET (measured in
     pixels).  The WIDTH and HEIGHT parameters apply to all frames,
     whereas XOFFSET and YOFFSET only to the initial frame.

`-fs'
`--fullscreen'
     Specify that width and height shall be the size of the screen.
     Normally no window manager decorations are shown.

`-mm'
`--maximized'
     Specify that the Emacs frame shall be maximized.  This normally
     means that the frame has window manager decorations.

`-fh'
`--fullheight'
     Specify that the height shall be the height of the screen.

`-fw'
`--fullwidth'
     Specify that the width shall be the width of the screen.

In the `--geometry' option, `{+-}' means either a plus  sign or a minus
sign.  A plus sign before XOFFSET means it is the distance from the
left side of the screen; a minus sign means it counts from the right
side.  A plus sign before YOFFSET means it is the distance from the top
of the screen, and a minus sign there indicates the distance from the
bottom.  The values XOFFSET and YOFFSET may themselves be positive or
negative, but that doesn't change their meaning, only their direction.

   Emacs uses the same units as `xterm' does to interpret the geometry.
The WIDTH and HEIGHT are measured in characters, so a large font
creates a larger frame than a small font.  (If you specify a
proportional font, Emacs uses its maximum bounds width as the width
unit.)  The XOFFSET and YOFFSET are measured in pixels.

   You do not have to specify all of the fields in the geometry
specification.  If you omit both XOFFSET and YOFFSET, the window
manager decides where to put the Emacs frame, possibly by letting you
place it with the mouse.  For example, `164x55' specifies a window 164
columns wide, enough for two ordinary width windows side by side, and
55 lines tall.

   The default frame width is 80 characters and the default height is
40 lines.  You can omit either the width or the height or both.  If you
start the geometry with an integer, Emacs interprets it as the width.
If you start with an `x' followed by an integer, Emacs interprets it as
the height.  Thus, `81' specifies just the width; `x45' specifies just
the height.

   If you start with `+' or `-', that introduces an offset, which means
both sizes are omitted.  Thus, `-3' specifies the XOFFSET only.  (If
you give just one offset, it is always XOFFSET.)  `+3-3' specifies both
the XOFFSET and the YOFFSET, placing the frame near the bottom left of
the screen.

   You can specify a default for any or all of the fields in your X
resource file (*note Resources::), and then override selected fields
with a `--geometry' option.

   Since the mode line and the echo area occupy the last 2 lines of the
frame, the height of the initial text window is 2 less than the height
specified in your geometry.  In non-X-toolkit versions of Emacs, the
menu bar also takes one line of the specified number.  But in the X
toolkit version, the menu bar is additional and does not count against
the specified height.  The tool bar, if present, is also additional.

   Enabling or disabling the menu bar or tool bar alters the amount of
space available for ordinary text.  Therefore, if Emacs starts up with
a tool bar (which is the default), and handles the geometry
specification assuming there is a tool bar, and then your
initialization file disables the tool bar, you will end up with a frame
geometry different from what you asked for.  To get the intended size
with no tool bar, use an X resource to specify "no tool bar" (*note
Table of Resources::); then Emacs will already know there's no tool bar
when it processes the specified geometry.

   When using one of `--fullscreen', `--maximized', `--fullwidth' or
`--fullheight' there may be some space around the frame anyway.  That
is because Emacs rounds the sizes so they are an even number of
character heights and widths.

   Some window managers have options that can make them ignore both
program-specified and user-specified positions.  If these are set,
Emacs fails to position the window correctly.


File: emacs,  Node: Borders X,  Next: Title X,  Prev: Window Size X,  Up: Emacs Invocation

C.9 Internal and External Borders
=================================

An Emacs frame has an internal border and an external border.  The
internal border is an extra strip of the background color around the
text portion of the frame.  Emacs itself draws the internal border.
The external border is added by the window manager outside the frame;
depending on the window manager you use, it may contain various boxes
you can click on to move or iconify the window.

`-ib WIDTH'
`--internal-border=WIDTH'
     Specify WIDTH as the width of the internal border (between the text
     and the main border), in pixels.

`-bw WIDTH'
`--border-width=WIDTH'
     Specify WIDTH as the width of the main border, in pixels.

   When you specify the size of the frame, that does not count the
borders.  The frame's position is measured from the outside edge of the
external border.

   Use the `-ib N' option to specify an internal border N pixels wide.
The default is 1.  Use `-bw N' to specify the width of the external
border (though the window manager may not pay attention to what you
specify).  The default width of the external border is 2.


File: emacs,  Node: Title X,  Next: Icons X,  Prev: Borders X,  Up: Emacs Invocation

C.10 Frame Titles
=================

An Emacs frame may or may not have a specified title.  The frame title,
if specified, appears in window decorations and icons as the name of
the frame.  If an Emacs frame has no specified title, the default title
has the form `INVOCATION-NAME@MACHINE' (if there is only one frame) or
the selected window's buffer name (if there is more than one frame).

   You can specify a title for the initial Emacs frame with a command
line option:

`-T TITLE'
`--title=TITLE'
     Specify TITLE as the title for the initial Emacs frame.

   The `--name' option (*note Resources::) also specifies the title for
the initial Emacs frame.


File: emacs,  Node: Icons X,  Next: Misc X,  Prev: Title X,  Up: Emacs Invocation

C.11 Icons
==========

`-iconic'
`--iconic'
     Start Emacs in an iconified ("minimized") state.

`-nbi'
`--no-bitmap-icon'
     Disable the use of the Emacs icon.

   Most window managers allow you to "iconify" (or "minimize") an Emacs
frame, hiding it from sight.  Some window managers replace iconified
windows with tiny "icons", while others remove them entirely from
sight.  The `-iconic' option tells Emacs to begin running in an
iconified state, rather than showing a frame right away.  The text
frame doesn't appear until you deiconify (or "un-minimize") it.

   By default, Emacs uses an icon containing the Emacs logo.  On
desktop environments such as Gnome, this icon is also displayed in
other contexts, e.g. when switching into an Emacs frame.  The `-nbi' or
`--no-bitmap-icon' option tells Emacs to let the window manager choose
what sort of icon to use--usually just a small rectangle containing the
frame's title.


File: emacs,  Node: Misc X,  Prev: Icons X,  Up: Emacs Invocation

C.12 Other Display Options
==========================

`--parent-id ID'
     Open Emacs as a client X window via the XEmbed protocol, with ID
     as the parent X window id.  Currently, this option is mainly useful
     for developers.

`-vb'
`--vertical-scroll-bars'
     Enable vertical scroll bars.

`-lsp PIXELS'
`--line-spacing=PIXELS'
     Specify PIXELS as additional space to put between lines, in pixels.

`-nbc'
`--no-blinking-cursor'
     Disable the blinking cursor on graphical displays.

`-D'
`--basic-display'
     Disable the menu-bar, the tool-bar, the scroll-bars, and tool tips,
     and turn off the blinking cursor.  This can be useful for making a
     test case that simplifies debugging of display problems.

   The `--xrm' option (*note Resources::) specifies additional X
resource values.


File: emacs,  Node: X Resources,  Next: Antinews,  Prev: Emacs Invocation,  Up: Top

Appendix D X Options and Resources
**********************************

You can customize some X-related aspects of Emacs behavior using X
resources, as is usual for programs that use X.

   When Emacs is compiled with GTK+ support, the appearance of various
graphical widgets, such as the menu-bar, scroll-bar, and dialog boxes,
is determined by "GTK resources", which we will also describe.  When
Emacs is built without GTK+ support, the appearance of these widgets is
determined by additional X resources.

   On MS-Windows, you can customize some of the same aspects using the
system registry (*note MS-Windows Registry::).

* Menu:

* Resources::           Using X resources with Emacs (in general).
* Table of Resources::  Table of specific X resources that affect Emacs.
* Lucid Resources::     X resources for Lucid menus.
* LessTif Resources::   X resources for LessTif and Motif menus.
* GTK resources::       Resources for GTK widgets.


File: emacs,  Node: Resources,  Next: Table of Resources,  Up: X Resources

D.1 X Resources
===============

Programs running under the X Window System organize their user options
under a hierarchy of classes and resources.  You can specify default
values for these options in your "X resource file", usually named
`~/.Xdefaults' or `~/.Xresources'.  Changes in this file do not take
effect immediately, because the X server stores its own list of
resources; to update it, use the command `xrdb'--for instance, `xrdb
~/.Xdefaults'.

   (MS-Windows systems do not support X resource files; on such systems,
Emacs looks for X resources in the Windows Registry, first under the
key `HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs', which affects only the
current user and override the system-wide settings, and then under the
key `HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs', which affects all users of
the system.  The menu and scroll bars are native widgets on MS-Windows,
so they are only customizable via the system-wide settings in the
Display Control Panel.  You can also set resources using the `-xrm'
command line option, as explained below.)

   Each line in the X resource file specifies a value for one option or
for a collection of related options.  The order in which the lines
appear in the file does not matter.  Each resource specification
consists of a "program name" and a "resource name".  Case distinctions
are significant in each of these names.  Here is an example:

     emacs.cursorColor: dark green

   The program name is the name of the executable file to which the
resource applies.  For Emacs, this is normally `emacs'.  To specify a
definition that applies to all instances of Emacs, regardless of the
name of the Emacs executable, use `Emacs'.

   The resource name is the name of a program setting.  For instance,
Emacs recognizes a `cursorColor' resource that controls the color of
the text cursor.

   Resources are grouped into named classes.  For instance, the
`Foreground' class contains the `cursorColor', `foreground' and
`pointerColor' resources (*note Table of Resources::).  Instead of
using a resource name, you can use a class name to specify the default
value for all resources in that class, like this:

     emacs.Foreground: dark green

   Emacs does not process X resources at all if you set the variable
`inhibit-x-resources' to a non-`nil' value.  If you invoke Emacs with
the `-Q' (or `--quick') command-line option, `inhibit-x-resources' is
automatically set to `t' (*note Initial Options::).

   In addition, you can use the following command-line options to
override the X resources file:

`-name NAME'
`--name=NAME'
     This option sets the program name of the initial Emacs frame to
     NAME.  It also sets the title of the initial frame to NAME.  This
     option does not affect subsequent frames.

     If you don't specify this option, the default is to use the Emacs
     executable's name as the program name.

     For consistency, `-name' also specifies the name to use for other
     resource values that do not belong to any particular frame.

     The resources that name Emacs invocations also belong to a class,
     named `Emacs'.  If you write `Emacs' instead of `emacs', the
     resource applies to all frames in all Emacs jobs, regardless of
     frame titles and regardless of the name of the executable file.

`-xrm RESOURCE-VALUES'
`--xrm=RESOURCE-VALUES'
     This option specifies X resource values for the present Emacs job.

     RESOURCE-VALUES should have the same format that you would use
     inside a file of X resources.  To include multiple resource
     specifications in RESOURCE-VALUES, put a newline between them,
     just as you would in a file.  You can also use `#include
     "FILENAME"' to include a file full of resource specifications.
     Resource values specified with `-xrm' take precedence over all
     other resource specifications.


File: emacs,  Node: Table of Resources,  Next: Lucid Resources,  Prev: Resources,  Up: X Resources

D.2 Table of X Resources for Emacs
==================================

This table lists the X resource names that Emacs recognizes, excluding
those that control the appearance of graphical widgets like the menu
bar:

`background' (class `Background')
     Background color (*note Colors::).

`bitmapIcon' (class `BitmapIcon')
     Tell the window manager to display the Emacs icon if `on'; don't
     do so if `off'.  *Note Icons X::, for a description of the icon.

`borderColor' (class `BorderColor')
     Color of the frame's external border.  This has no effect if Emacs
     is compiled with GTK+ support.

`borderWidth' (class `BorderWidth')
     Width of the frame's external border, in pixels.  This has no
     effect if Emacs is compiled with GTK+ support.

`cursorColor' (class `Foreground')
     Text cursor color.  If this resource is specified when Emacs starts
     up, Emacs sets its value as the background color of the `cursor'
     face (*note Faces::).

`cursorBlink' (class `CursorBlink')
     If the value of this resource is `off' or `false' or `0' at
     startup, Emacs disables Blink Cursor mode (*note Cursor Display::).

`font' (class `Font')
     Font name for the `default' face (*note Fonts::).  You can also
     specify a fontset name (*note Fontsets::).

`fontBackend' (class `FontBackend')
     Comma-delimited list of backend(s) to use for drawing fonts, in
     order of precedence.  For instance, the value `x,xft' tells Emacs
     to draw fonts using the X core font driver, falling back on the
     Xft font driver if that fails.  Normally, you should leave this
     resource unset, in which case Emacs tries using all available font
     backends.

`foreground' (class `Foreground')
     Default foreground color for text.

`geometry' (class `Geometry')
     Window size and position.  The value should be a size and position
     specification, of the same form as in the `-g' or `--geometry'
     command-line option (*note Window Size X::).

     The size applies to all frames in the Emacs session, but the
     position applies only to the initial Emacs frame (or, in the case
     of a resource for a specific frame name, only that frame).

     Be careful not to specify this resource as `emacs*geometry', as
     that may affect individual menus as well as the main Emacs frame.

`fullscreen' (class `Fullscreen')
     The desired fullscreen size.  The value can be one of `fullboth',
     `maximized', `fullwidth' or `fullheight', which correspond to the
     command-line options `-fs', `-mm', `-fw', and `-fh' (*note Window
     Size X::).  Note that this applies to the initial frame only.

`iconName' (class `Title')
     Name to display in the icon.

`internalBorder' (class `BorderWidth')
     Width of the internal frame border, in pixels.

`lineSpacing' (class `LineSpacing')
     Additional space between lines, in pixels.

`menuBar' (class `MenuBar')
     If the value of this resource is `off' or `false' or `0', Emacs
     disables Menu Bar mode at startup (*note Menu Bars::).

`minibuffer' (class `Minibuffer')
     If `none', Emacs will not make a minibuffer in this frame; it will
     use a separate minibuffer frame instead.

`paneFont' (class `Font')
     Font name for menu pane titles, in non-toolkit versions of Emacs.

`pointerColor' (class `Foreground')
     Color of the mouse cursor.  This has no effect in many graphical
     desktop environments, as they do not let Emacs change the mouse
     cursor this way.

`privateColormap' (class `PrivateColormap')
     If `on', use a private color map, in the case where the "default
     visual" of class PseudoColor and Emacs is using it.

`reverseVideo' (class `ReverseVideo')
     Switch foreground and background default colors if `on', use
     colors as specified if `off'.

`screenGamma' (class `ScreenGamma')
     Gamma correction for colors, equivalent to the frame parameter
     `screen-gamma'.

`scrollBarWidth' (class `ScrollBarWidth')
     The scroll bar width in pixels, equivalent to the frame parameter
     `scroll-bar-width'.  Do not set this resource if Emacs is compiled
     with GTK+ support.

`selectionFont' (class `SelectionFont')
     Font name for pop-up menu items, in non-toolkit versions of Emacs.
     (For toolkit versions, see *note Lucid Resources::, also see *note
     LessTif Resources::.)

`selectionTimeout' (class `SelectionTimeout')
     Number of milliseconds to wait for a selection reply.  If the
     selection owner doesn't reply in this time, we give up.  A value
     of 0 means wait as long as necessary.

`synchronous' (class `Synchronous')
     Run Emacs in synchronous mode if `on'.  Synchronous mode is useful
     for debugging X problems.

`title' (class `Title')
     Name to display in the title bar of the initial Emacs frame.

`toolBar' (class `ToolBar')
     If the value of this resource is `off' or `false' or `0', Emacs
     disables Tool Bar mode at startup (*note Tool Bars::).

`useXIM' (class `UseXIM')
     Disable use of X input methods (XIM) if `false' or `off'.  This is
     only relevant if your Emacs is built with XIM support.  It might
     be useful to turn off XIM on slow X client/server links.

`verticalScrollBars' (class `ScrollBars')
     Give frames scroll bars if `on'; don't have scroll bars if `off'.

`visualClass' (class `VisualClass')
     The "visual class" for X color display.  If specified, the value
     should start with one of `TrueColor', `PseudoColor',
     `DirectColor', `StaticColor', `GrayScale', and `StaticGray',
     followed by `-DEPTH', where DEPTH is the number of color planes.

   You can also use X resources to customize individual Emacs faces
(*note Faces::).  For example, setting the resource
`FACE.attributeForeground' is equivalent to customizing the
`foreground' attribute of the face FACE.  However, we recommend
customizing faces from within Emacs, instead of using X resources.
*Note Face Customization::.


File: emacs,  Node: Lucid Resources,  Next: LessTif Resources,  Prev: Table of Resources,  Up: X Resources

D.3 Lucid Menu And Dialog X Resources
=====================================

If Emacs is compiled with the X toolkit support using Lucid widgets,
you can use X resources to customize the appearance of the menu bar,
pop-up menus, and dialog boxes.  The resources for the menu bar fall in
the `pane.menubar' class (following, as always, either the name of the
Emacs executable or `Emacs' for all Emacs invocations).  The resources
for the pop-up menu are in the `menu*' class.  The resources for dialog
boxes are in the `dialog*' class.

   For example, to display menu bar entries with the `Courier-12' font
(*note Fonts::), write this:

     Emacs.pane.menubar.font: Courier-12

Lucid widgets can display multilingual text in your locale.  To enable
this, specify a `fontSet' resource instead of a `font' resource.  *Note
Fontsets::.  If both `font' and `fontSet' resources are specified, the
`fontSet' resource is used.

   Here is a list of resources for menu bars, pop-up menus, and dialogs:

`font'
     Font for menu item text.

`fontSet'
     Fontset for menu item text.

`foreground'
     Foreground color.

`background'
     Background color.

`buttonForeground'
     Foreground color for a selected item.

`horizontalSpacing'
     Horizontal spacing in pixels between items.  Default is 3.

`verticalSpacing'
     Vertical spacing in pixels between items.  Default is 2.

`arrowSpacing'
     Horizontal spacing between the arrow (which indicates a submenu)
     and the associated text.  Default is 10.

`shadowThickness'
     Thickness of shadow lines for 3D buttons, arrows, and other
     graphical elements.  Default is 1.

`margin'
     Margin of the menu bar, in characters.  Default is 1.


File: emacs,  Node: LessTif Resources,  Next: GTK resources,  Prev: Lucid Resources,  Up: X Resources

D.4 LessTif Menu X Resources
============================

If Emacs is compiled with the X toolkit support using LessTif or Motif
widgets, you can use X resources to customize the appearance of the
menu bar, pop-up menus, and dialog boxes.  However, the resources are
organized differently from Lucid widgets.

   The resource names for the menu bar are in the `pane.menubar' class,
and they must be specified in this form:

     Emacs.pane.menubar.SUBWIDGET.RESOURCE:  VALUE

For pop-up menus, the resources are in the `menu*' class, instead of
`pane.menubar'.  For dialog boxes, they are in `dialog'.  In each case,
each individual menu string is a subwidget; the subwidget's name is the
same as the menu item string.  For example, the `File' menu in the menu
bar is a subwidget named `emacs.pane.menubar.File'.

   Typically, you want to specify the same resources for the whole menu
bar.  To do this, use `*' instead of a specific subwidget name.  For
example, to specify the font `8x16' for all menu bar items, including
submenus, write this:

     Emacs.pane.menubar.*.fontList:  8x16

   Each item in a submenu also has its own name for X resources; for
example, the `File' submenu has an item named `Save (current buffer)'.
A resource specification for a submenu item looks like this:

     Emacs.pane.menubar.popup_*.MENU.ITEM.RESOURCE: VALUE

For example, here's how to specify the font for the `Save (current
buffer)' item:

     Emacs.pane.menubar.popup_*.File.Save (current buffer).fontList: 8x16

For an item in a second-level submenu, such as `Complete Word' under
`Spell Checking' under `Tools', the resource fits this template:

     Emacs.pane.menubar.popup_*.popup_*.MENU.RESOURCE: VALUE

For example,

     Emacs.pane.menubar.popup_*.popup_*.Spell Checking.Complete Word: VALUE

(This should be one long line.)

   If you want the submenu items to look different from the menu bar
itself, you must first specify the resource for all of them, then
override the value for submenus alone.  Here is an example:

     Emacs.pane.menubar.*.fontList:  8x16
     Emacs.pane.menubar.popup_*.fontList: 8x16

   To specify resources for the LessTif file-selection box, use `fsb*',
like this:

     Emacs.fsb*.fontList: 8x16

   Here is a list of resources for LessTif menu bars and pop-up menus:

`armColor'
     The color to show in an armed button.

`fontList'
     The font to use.

`marginBottom'
`marginHeight'
`marginLeft'
`marginRight'
`marginTop'
`marginWidth'
     Amount of space to leave around the item, within the border.

`borderWidth'
     The width of the border around the menu item, on all sides.

`shadowThickness'
     The width of the border shadow.

`bottomShadowColor'
     The color for the border shadow, on the bottom and the right.

`topShadowColor'
     The color for the border shadow, on the top and the left.


File: emacs,  Node: GTK resources,  Prev: LessTif Resources,  Up: X Resources

D.5 GTK resources
=================

If Emacs is compiled with GTK+ toolkit support, the simplest way to
customize its GTK+ widgets (e.g. menus, dialogs, tool bars and scroll
bars) is to choose an appropriate GTK+ theme, for example with the
GNOME theme selector.

   In GTK+ version 2, you can also use "GTK+ resources" to customize
the appearance of GTK+ widgets used by Emacs.  These resources are
specified in either the file `~/.emacs.d/gtkrc' (for Emacs-specific
GTK+ resources), or `~/.gtkrc-2.0' (for general GTK+ resources).  We
recommend using `~/.emacs.d/gtkrc', since GTK+ seems to ignore
`~/.gtkrc-2.0' when running GConf with GNOME.  Note, however, that some
GTK themes may override customizations in `~/.emacs.d/gtkrc'; there is
nothing we can do about this.  GTK+ resources do not affect aspects of
Emacs unrelated to GTK+ widgets, such as fonts and colors in the main
Emacs window; those are governed by normal X resources (*note
Resources::).

   The following sections describe how to customize GTK+ resources for
Emacs.  For details about GTK+ resources, see the GTK+ API document at
`http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html'.

   In GTK+ version 3, GTK+ resources have been replaced by a completely
different system.  The appearance of GTK+ widgets is now determined by
CSS-like style files: `gtk-3.0/gtk.css' in the GTK+ installation
directory, and `~/.themes/THEME/gtk-3.0/gtk.css' for local style
settings (where THEME is the name of the current GTK+ theme).
Therefore, the description of GTK+ resources in this section does not
apply to GTK+ 3.  For details about the GTK+ 3 styling system, see
`http://developer.gnome.org/gtk3/3.0/GtkCssProvider.html'.

* Menu:

* GTK Resource Basics::   Basic usage of GTK+ resources.
* GTK Widget Names::      How GTK+ widgets are named.
* GTK Names in Emacs::    GTK widgets used by Emacs.
* GTK styles::            What can be customized in a GTK widget.


File: emacs,  Node: GTK Resource Basics,  Next: GTK Widget Names,  Up: GTK resources

D.5.1 GTK Resource Basics
-------------------------

In a GTK+ 2 resource file (usually `~/.emacs.d/gtkrc'), the simplest
kinds of resource settings simply assign a value to a variable.  For
example, putting the following line in the resource file changes the
font on all GTK+ widgets to `courier-12':

     gtk-font-name = "courier 12"

Note that in this case the font name must be supplied as a GTK font
pattern (also called a "Pango font name"), not as a Fontconfig-style
font name or XLFD.  *Note Fonts::.

   To customize widgets you first define a "style", and then apply the
style to the widgets.  Here is an example that sets the font for menus
(`#' characters indicate comments):

     # Define the style `my_style'.
     style "my_style"
     {
       font_name = "helvetica bold 14"
     }

     # Specify that widget type `*emacs-menuitem*' uses `my_style'.
     widget "*emacs-menuitem*" style "my_style"

The widget name in this example contains wildcards, so the style is
applied to all widgets matching `*emacs-menuitem*'.  The widgets are
named by the way they are contained, from the outer widget to the inner
widget.  Here is another example that applies `my_style' specifically
to the Emacs menu bar:

     widget "Emacs.pane.menubar.*" style "my_style"

   Here is a more elaborate example, showing how to change the parts of
the scroll bar:

     style "scroll"
     {
       fg[NORMAL] = "red"     # Arrow color.
       bg[NORMAL] = "yellow"  # Thumb and background around arrow.
       bg[ACTIVE] = "blue"    # Trough color.
       bg[PRELIGHT] = "white" # Thumb color when the mouse is over it.
     }

     widget "*verticalScrollBar*" style "scroll"


File: emacs,  Node: GTK Widget Names,  Next: GTK Names in Emacs,  Prev: GTK Resource Basics,  Up: GTK resources

D.5.2 GTK widget names
----------------------

A GTK+ widget is specified by a "widget name" and a "widget class".
The widget name refers to a specific widget (e.g. `emacs-menuitem'),
while the widget class refers to a collection of similar widgets (e.g.
`GtkMenuItem').  A widget always has a class, but need not have a name.

   "Absolute names" are sequences of widget names or widget classes,
corresponding to hierarchies of widgets embedded within other widgets.
For example, if a `GtkWindow' named `top' contains a `GtkVBox' named
`box', which in turn contains a `GtkMenuBar' called `menubar', the
absolute class name of the menu-bar widget is
`GtkWindow.GtkVBox.GtkMenuBar', and its absolute widget name is
`top.box.menubar'.

   GTK+ resource files can contain two types of commands for specifying
widget appearances:

`widget'
     specifies a style for widgets based on the class name, or just the
     class.

`widget_class'
     specifies a style for widgets based on the class name.

See the previous subsection for examples of using the `widget' command;
the `widget_class' command is used similarly.  Note that the widget
name/class and the style must be enclosed in double-quotes, and these
commands must be at the top level in the GTK+ resource file.

   As previously noted, you may specify a widget name or class with
shell wildcard syntax: `*' matches zero or more characters and `?'
matches one character.  This example assigns a style to all widgets:

     widget "*" style "my_style"


File: emacs,  Node: GTK Names in Emacs,  Next: GTK styles,  Prev: GTK Widget Names,  Up: GTK resources

D.5.3 GTK Widget Names in Emacs
-------------------------------

The GTK+ widgets used by an Emacs frame are listed below:

`Emacs' (class `GtkWindow')

    `pane' (class `GtkVBox')

         `menubar' (class `GtkMenuBar')

              [menu item widgets]

         [unnamed widget] (class `GtkHandleBox')

              `emacs-toolbar' (class `GtkToolbar')

                   [tool bar item widgets]

         `emacs' (class `GtkFixed')

              `verticalScrollBar' (class `GtkVScrollbar')

The contents of Emacs windows are drawn in the `emacs' widget.  Note
that even if there are multiple Emacs windows, each scroll bar widget
is named `verticalScrollBar'.

   For example, here are two different ways to set the menu bar style:

     widget "Emacs.pane.menubar.*" style "my_style"
     widget_class "GtkWindow.GtkVBox.GtkMenuBar.*" style "my_style"

   For GTK+ dialogs, Emacs uses a widget named `emacs-dialog', of class
`GtkDialog'.  For file selection, Emacs uses a widget named
`emacs-filedialog', of class `GtkFileSelection'.

   Because the widgets for pop-up menus and dialogs are free-standing
windows and not "contained" in the `Emacs' widget, their GTK+ absolute
names do not start with `Emacs'.  To customize these widgets, use
wildcards like this:

     widget "*emacs-dialog*" style "my_dialog_style"
     widget "*emacs-filedialog* style "my_file_style"
     widget "*emacs-menuitem* style "my_menu_style"

   If you want to apply a style to all menus in Emacs, use this:

     widget_class "*Menu*" style "my_menu_style"


File: emacs,  Node: GTK styles,  Prev: GTK Names in Emacs,  Up: GTK resources

D.5.4 GTK styles
----------------

Here is an example of two GTK+ style declarations:

     pixmap_path "/usr/share/pixmaps:/usr/include/X11/pixmaps"

     style "default"
     {
       font_name = "helvetica 12"

       bg[NORMAL] = { 0.83, 0.80, 0.73 }
       bg[SELECTED] = { 0.0, 0.55, 0.55 }
       bg[INSENSITIVE] = { 0.77, 0.77, 0.66 }
       bg[ACTIVE] = { 0.0, 0.55, 0.55 }
       bg[PRELIGHT] = { 0.0, 0.55, 0.55 }

       fg[NORMAL] = "black"
       fg[SELECTED] = { 0.9, 0.9, 0.9 }
       fg[ACTIVE] = "black"
       fg[PRELIGHT] = { 0.9, 0.9, 0.9 }

       base[INSENSITIVE] = "#777766"
       text[INSENSITIVE] = { 0.60, 0.65, 0.57 }

       bg_pixmap[NORMAL] = "background.xpm"
       bg_pixmap[INSENSITIVE] = "background.xpm"
       bg_pixmap[ACTIVE] = "background.xpm"
       bg_pixmap[PRELIGHT] = "<none>"

     }

     style "ruler" = "default"
     {
       font_name = "helvetica 8"
     }

   The style `ruler' inherits from `default'.  This way you can build
on existing styles.  The syntax for fonts and colors is described below.

   As this example shows, it is possible to specify several values for
foreground and background depending on the widget's "state".  The
possible states are:

`NORMAL'
     This is the default state for widgets.

`ACTIVE'
     This is the state for a widget that is ready to do something.  It
     is also for the trough of a scroll bar, i.e. `bg[ACTIVE] = "red"'
     sets the scroll bar trough to red.  Buttons that have been pressed
     but not released yet ("armed") are in this state.

`PRELIGHT'
     This is the state for a widget that can be manipulated, when the
     mouse pointer is over it--for example when the mouse is over the
     thumb in the scroll bar or over a menu item.  When the mouse is
     over a button that is not pressed, the button is in this state.

`SELECTED'
     This is the state for data that has been selected by the user.  It
     can be selected text or items selected in a list.  This state is
     not used in Emacs.

`INSENSITIVE'
     This is the state for widgets that are visible, but they can not be
     manipulated in the usual way--for example, buttons that can't be
     pressed, and disabled menu items.  To display disabled menu items
     in yellow, use `fg[INSENSITIVE] = "yellow"'.

   Here are the things that can go in a style declaration:

`bg[STATE] = COLOR'
     This specifies the background color for the widget.  Note that
     editable text doesn't use `bg'; it uses `base' instead.

`base[STATE] = COLOR'
     This specifies the background color for editable text.  In Emacs,
     this color is used for the background of the text fields in the
     file dialog.

`bg_pixmap[STATE] = "PIXMAP"'
     This specifies an image background (instead of a background color).
     PIXMAP should be the image file name.  GTK can use a number of
     image file formats, including XPM, XBM, GIF, JPEG and PNG.  If you
     want a widget to use the same image as its parent, use `<parent>'.
     If you don't want any image, use `<none>'.  `<none>' is the way to
     cancel a background image inherited from a parent style.

     You can't specify the file by its absolute file name.  GTK looks
     for the pixmap file in directories specified in `pixmap_path'.
     `pixmap_path' is a colon-separated list of directories within
     double quotes, specified at the top level in a `gtkrc' file (i.e.
     not inside a style definition; see example above):

          pixmap_path "/usr/share/pixmaps:/usr/include/X11/pixmaps"

`fg[STATE] = COLOR'
     This specifies the foreground color for widgets to use.  It is the
     color of text in menus and buttons, and the color for the arrows in
     the scroll bar.  For editable text, use `text'.

`text[STATE] = COLOR'
     This is the color for editable text.  In Emacs, this color is used
     for the text fields in the file dialog.

`font_name = "FONT"'
     This specifies the font for text in the widget.  FONT is a
     GTK-style (or Pango) font name, like `Sans Italic 10'.  *Note
     Fonts::.  The names are case insensitive.

   There are three ways to specify a color: a color name, an RGB
triplet, or a GTK-style RGB triplet.  *Note Colors::, for a description
of color names and RGB triplets.  Color names should be enclosed with
double quotes, e.g. `"red"'.  RGB triplets should be written without
double quotes, e.g. `#ff0000'.  GTK-style RGB triplets have the form
`{ R, G, B }', where R, G and B are either integers in the range 0-65535
or floats in the range 0.0-1.0.


File: emacs,  Node: Antinews,  Next: Mac OS / GNUstep,  Prev: X Resources,  Up: Top

Appendix E Emacs 23 Antinews
****************************

For those users who live backwards in time, here is information about
downgrading to Emacs version 23.4.  We hope you will enjoy the greater
simplicity that results from the absence of many Emacs 24.2 features.

   * Support for displaying and editing "bidirectional" text has been
     removed.  Text is now always displayed on the screen in a single
     consistent direction--left to right--regardless of the underlying
     script.  Similarly, `C-f' and `C-b' always move the text cursor to
     the right and left respectively.  Also, <right> and <left> are now
     equivalent to `C-f' and `C-b', as you might expect, rather than
     moving forward or backward based on the underlying "paragraph
     direction".

     Users of "right-to-left" languages, like Arabic and Hebrew, may
     adapt by reading and/or editing text in left-to-right order.

   * The Emacs Lisp package manager has been removed.  Instead of using
     a "user interface" (`M-x list-packages'), additional Lisp packages
     must now be installed by hand, which is the most flexible and
     "Lispy" method anyway.  Typically, this just involves editing your
     init file to add the package installation directory to the load
     path and defining some autoloads; see each package's commentary
     section and/or README file for details.

   * The option `delete-active-region' has been deleted.  When the
     region is active, typing <DEL> or <delete> no longer deletes the
     text in the region; it deletes a single character instead.

   * We have reworked how Emacs handles the clipboard and the X primary
     selection.  Commands for killing and yanking, like `C-w' and
     `C-y', use the primary selection and not the clipboard, so you can
     use these commands without interfering with "cutting" or "pasting"
     in other programs.  The `Cut'/`Copy'/`Paste' menu items are bound
     to separate clipboard commands, not to the same commands as
     `C-w'/`M-w'/`C-y'.

     Selecting text by dragging with the mouse now puts the text in the
     kill ring, in addition to the primary selection.  But note that
     selecting an active region with `C-<SPC>' does _not_ alter the
     kill ring nor the primary selection, even though the text
     highlighting is visually identical.

   * In Isearch, `C-y' and `M-y' are no longer bound to
     `isearch-yank-kill' and `isearch-yank-pop' respectively.  Instead,
     `C-y' yanks the rest of the current line into the search string
     (`isearch-yank-line'), whereas `M-y' does `isearch-yank-kill'.
     The mismatch with the usual meanings of `C-y' and `M-y' is
     unintended.

   * Various completion features have been simplified.  The option
     `completion-category-overrides' has been removed, so Emacs uses a
     single consistent scheme to generate completions, instead of using
     a separate scheme for (say) buffer name completion.  Several major
     modes, such as Shell mode, now implement their own inline
     completion commands instead of using `completion-at-point'.

   * We have removed several options for controlling how windows are
     used, such as `display-buffer-base-action',
     `display-buffer-alist', `window-combination-limit', and
     `window-combination-resize'.

   * The command `M-x customize-themes' has been removed.  Emacs no
     longer comes with pre-defined themes (you can write your own).

   * Emacs no longer adapts various aspects of its display to GTK+
     settings, opting instead for a uniform toolkit-independent look.
     GTK+ scroll bars are placed on the left, the same position as
     non-GTK+ X scroll bars.  Emacs no longer refers to GTK+ to set the
     default `region' face, nor for drawing tooltips.

   * Setting the option `delete-by-moving-to-trash' to a non-`nil' now
     causes all file deletions to use the system trash, even temporary
     files created by Lisp programs; furthermore, the `M-x delete-file'
     and `M-x delete-directory' commands no longer accept prefix
     arguments to force true deletion.

   * On GNU/Linux and Unix, the default method for sending mail (as
     specified by `send-mail-function') is to use the `sendmail'
     program.  Emacs no longer asks for a delivery method the first
     time you try to send mail, trusting instead that the system is
     configured for mail delivery, as it ought to be.

   * Several VC features have been removed, including the `C-x v +' and
     `C-x v m' commands for pulling and merging on distributed version
     control systems, and the ability to view inline log entries in the
     log buffers made by `C-x v L'.

   * To keep up with decreasing computer memory capacity and disk
     space, many other functions and files have been eliminated in
     Emacs 23.4.


File: emacs,  Node: Mac OS / GNUstep,  Next: Microsoft Windows,  Prev: Antinews,  Up: Top

Appendix F Emacs and Mac OS / GNUstep
*************************************

This section describes the peculiarities of using Emacs built with the
GNUstep libraries on GNU/Linux or other operating systems, or on Mac OS
X with native window system support.  On Mac OS X, Emacs can be built
either without window system support, with X11, or with the Cocoa
interface; this section only applies to the Cocoa build.  This does not
support versions of Mac OS X earlier than 10.4.

   For various historical and technical reasons, Emacs uses the term
`Nextstep' internally, instead of "Cocoa" or "Mac OS X"; for instance,
most of the commands and variables described in this section begin with
`ns-', which is short for `Nextstep'.  NeXTstep was an application
interface released by NeXT Inc during the 1980s, of which Cocoa is a
direct descendant.  Apart from Cocoa, there is another NeXTstep-style
system: GNUstep, which is free software.  As of this writing, Emacs
GNUstep support is alpha status (*note GNUstep Support::), but we hope
to improve it in the future.

* Menu:

* Mac / GNUstep Basics::        Basic Emacs usage under GNUstep or Mac OS.
* Mac / GNUstep Customization:: Customizations under GNUstep or Mac OS.
* Mac / GNUstep Events::        How window system events are handled.
* GNUstep Support::             Details on status of GNUstep support.


File: emacs,  Node: Mac / GNUstep Basics,  Next: Mac / GNUstep Customization,  Up: Mac OS / GNUstep

F.1 Basic Emacs usage under Mac OS and GNUstep
==============================================

By default, the <alt> and <option> keys are the same as <Meta>.  The
Mac <Cmd> key is the same as <Super>, and Emacs provides a set of key
bindings using this modifier key that mimic other Mac / GNUstep
applications (*note Mac / GNUstep Events::).  You can change these
bindings in the usual way (*note Key Bindings::).

   The variable `ns-right-alternate-modifier' controls the behavior of
the right <alt> and <option> keys.  These keys behave like the
left-hand keys if the value is `left' (the default).  A value of
`control', `meta', `alt', `super', or `hyper' makes them behave like
the corresponding modifier keys; a value of `none' tells Emacs to
ignore them.

   `S-Mouse-1' adjusts the region to the click position, just like
`Mouse-3' (`mouse-save-then-kill'); it does not pop up a menu for
changing the default face, as `S-Mouse-1' normally does (*note Text
Scale::).  This change makes Emacs behave more like other Mac / GNUstep
applications.

   When you open or save files using the menus, or using the `Cmd-o'
and `Cmd-S' bindings, Emacs uses graphical file dialogs to read file
names.  However, if you use the regular Emacs key sequences, such as
`C-x C-f', Emacs uses the minibuffer to read file names.

   On GNUstep, in an X-windows environment you need to use `Cmd-c'
instead of one of the `C-w' or `M-w' commands to transfer text to the X
primary selection; otherwise, Emacs will use the "clipboard" selection.
Likewise, `Cmd-y' (instead of `C-y') yanks from the X primary selection
instead of the kill-ring or clipboard.

F.1.1 Grabbing environment variables
------------------------------------

Many programs which may run under Emacs, like latex or man, depend on
the settings of environment variables.  If Emacs is launched from the
shell, it will automatically inherit these environment variables and
its subprocesses will inherit them from it.  But if Emacs is launched
from the Finder it is not a descendant of any shell, so its environment
variables haven't been set, which often causes the subprocesses it
launches to behave differently than they would when launched from the
shell.

   For the PATH and MANPATH variables, a system-wide method of setting
PATH is recommended on Mac OS X 10.5 and later, using the `/etc/paths'
files and the `/etc/paths.d' directory.


File: emacs,  Node: Mac / GNUstep Customization,  Next: Mac / GNUstep Events,  Prev: Mac / GNUstep Basics,  Up: Mac OS / GNUstep

F.2 Mac / GNUstep Customization
===============================

Emacs can be customized in several ways in addition to the standard
customization buffers and the Options menu.

F.2.1 Font and Color Panels
---------------------------

The standard Mac / GNUstep font and color panels are accessible via
Lisp commands.  The Font Panel may be accessed with `M-x
ns-popup-font-panel'.  It will set the default font in the frame most
recently used or clicked on.

   You can bring up a color panel with `M-x ns-popup-color-panel' and
drag the color you want over the Emacs face you want to change.  Normal
dragging will alter the foreground color.  Shift dragging will alter the
background color.  To discard the settings, create a new frame and
close the altered one.

   Useful in this context is the listing of all faces obtained by `M-x
list-faces-display'.

F.2.2 Customization options specific to Mac OS / GNUstep
--------------------------------------------------------

The following customization options are specific to the Nextstep port.

`ns-auto-hide-menu-bar'
     Non-nil means the menu-bar is hidden by default, but appears if you
     move the mouse pointer over it.  (Requires Mac OS X 10.6 or later.)



File: emacs,  Node: Mac / GNUstep Events,  Next: GNUstep Support,  Prev: Mac / GNUstep Customization,  Up: Mac OS / GNUstep

F.3 Windowing System Events under Mac OS / GNUstep
==================================================

Nextstep applications receive a number of special events which have no
X equivalent.  These are sent as specially defined "keys", which do not
correspond to any sequence of keystrokes.  Under Emacs, these "key"
events can be bound to functions just like ordinary keystrokes.  Here
is a list of these events.

<ns-open-file>
     This event occurs when another Nextstep application requests that
     Emacs open a file.  A typical reason for this would be a user
     double-clicking a file in the Finder application.  By default,
     Emacs responds to this event by opening a new frame and visiting
     the file in that frame (`ns-find-file').  As an exception, if the
     selected buffer is the `*scratch*' buffer, Emacs visits the file
     in the selected frame.

     You can change how Emacs responds to a `ns-open-file' event by
     changing the variable `ns-pop-up-frames'.  Its default value,
     `fresh', is what we have just described.  A value of `t' means to
     always visit the file in a new frame.  A value of `nil' means to
     always visit the file in an existing frame.

<ns-open-temp-file>
     This event occurs when another application requests that Emacs
     open a temporary file.  By default, this is handled by just
     generating a `ns-open-file' event, the results of which are
     described above.

<ns-open-file-line>
     Some applications, such as ProjectBuilder and gdb, request not
     only a particular file, but also a particular line or sequence of
     lines in the file.  Emacs handles this by visiting that file and
     highlighting the requested line (`ns-open-file-select-line').

<ns-drag-file>
     This event occurs when a user drags files from another application
     into an Emacs frame.  The default behavior is to insert the
     contents of all the dragged files into the current buffer
     (`ns-insert-files').  The list of dragged files is stored in the
     variable `ns-input-file'.

<ns-drag-color>
     This event occurs when a user drags a color from the color well (or
     some other source) into an Emacs frame.  The default behavior is to
     alter the foreground color of the area the color was dragged onto
     (`ns-set-foreground-at-mouse').  If this event is issued with a
     <Shift> modifier, Emacs changes the background color instead
     (`ns-set-background-at-mouse').  The name of the dragged color is
     stored in the variable `ns-input-color'.

<ns-change-font>
     This event occurs when the user selects a font in a Nextstep font
     panel (which can be opened with `Cmd-t').  The default behavior is
     to adjust the font of the selected frame
     (`ns-respond-to-changefont').  The name and size of the selected
     font are stored in the variables `ns-input-font' and
     `ns-input-fontsize', respectively.

<ns-power-off>
     This event occurs when the user logs out and Emacs is still
     running, or when `Quit Emacs' is chosen from the application menu.
     The default behavior is to save all file-visiting buffers.

   Emacs also allows users to make use of Nextstep services, via a set
of commands whose names begin with `ns-service-' and end with the name
of the service.  Type `M-x ns-service-<TAB>' to see a list of these
commands.  These functions either operate on marked text (replacing it
with the result) or take a string argument and return the result as a
string.  You can also use the Lisp function `ns-perform-service' to
pass arbitrary strings to arbitrary services and receive the results
back.  Note that you may need to restart Emacs to access
newly-available services.


File: emacs,  Node: GNUstep Support,  Prev: Mac / GNUstep Events,  Up: Mac OS / GNUstep

F.4 GNUstep Support
===================

Emacs can be built and run under GNUstep, but there are still issues to
be addressed.  Interested developers should contact
<emacs-devel@gnu.org>.


File: emacs,  Node: Microsoft Windows,  Next: Manifesto,  Prev: Mac OS / GNUstep,  Up: Top

Appendix G Emacs and Microsoft Windows/MS-DOS
*********************************************

This section describes peculiarities of using Emacs on Microsoft
Windows.  Some of these peculiarities are also relevant to Microsoft's
older MS-DOS "operating system" (also known as "MS-DOG").  However,
Emacs features that are relevant _only_ to MS-DOS are described in a
separate section (*note MS-DOS::).

   The behavior of Emacs on MS-Windows is reasonably similar to what is
documented in the rest of the manual, including support for long file
names, multiple frames, scroll bars, mouse menus, and subprocesses.
However, a few special considerations apply, and they are described
here.

* Menu:

* Windows Startup::     How to start Emacs on Windows.
* Text and Binary::     Text files use CRLF to terminate lines.
* Windows Files::       File-name conventions on Windows.
* ls in Lisp::          Emulation of `ls' for Dired.
* Windows HOME::        Where Emacs looks for your `.emacs' and
                          where it starts up.
* Windows Keyboard::    Windows-specific keyboard features.
* Windows Mouse::       Windows-specific mouse features.
* Windows Processes::   Running subprocesses on Windows.
* Windows Printing::    How to specify the printer on MS-Windows.
* Windows Fonts::       Specifying fonts on MS-Windows.
* Windows Misc::        Miscellaneous Windows features.

* MS-DOS::              Using Emacs on MS-DOS.


File: emacs,  Node: Windows Startup,  Next: Text and Binary,  Up: Microsoft Windows

G.1 How to Start Emacs on MS-Windows
====================================

There are several ways of starting Emacs on MS-Windows:

  1. From the desktop shortcut icon: either double-click the left mouse
     button on the icon, or click once, then press <RET>.  The desktop
     shortcut should specify as its "Target" (in the "Properties" of
     the shortcut) the full absolute file name of `runemacs.exe', _not_
     of `emacs.exe'.  This is because `runemacs.exe' hides the console
     window that would have been created if the target of the shortcut
     were `emacs.exe' (which is a console program, as far as Windows is
     concerned).  If you use this method, Emacs starts in the directory
     specified by the shortcut.  To control where that is, right-click
     on the shortcut, select "Properties", and in the "Shortcut" tab
     modify the "Start in" field to your liking.

  2. From the Command Prompt window, by typing `emacs <RET>' at the
     prompt.  The Command Prompt window where you did that will not be
     available for invoking other commands until Emacs exits.  In this
     case, Emacs will start in the current directory of the Windows
     shell.

  3. From the Command Prompt window, by typing `runemacs <RET>' at the
     prompt.  The Command Prompt window where you did that will be
     immediately available for invoking other commands.  In this case,
     Emacs will start in the current directory of the Windows shell.

  4. Via `emacsclient.exe' or `emacsclientw.exe', which allow you to
     invoke Emacs from other programs, and to reuse a running Emacs
     process for serving editing jobs required by other programs.
     *Note Emacs Server::.  The difference between `emacsclient.exe'
     and `emacsclientw.exe' is that the former is a console program,
     while the latter is a Windows GUI program.  Both programs wait for
     Emacs to signal that the editing job is finished, before they exit
     and return control to the program that invoked them.  Which one of
     them to use in each case depends on the expectations of the
     program that needs editing services.  If that program is itself a
     console (text-mode) program, you should use `emacsclient.exe', so
     that any of its messages and prompts appear in the same command
     window as those of the invoking program.  By contrast, if the
     invoking program is a GUI program, you will be better off using
     `emacsclientw.exe', because `emacsclient.exe' will pop up a
     command window if it is invoked from a GUI program.  A notable
     situation where you would want `emacsclientw.exe' is when you
     right-click on a file in the Windows Explorer and select "Open
     With" from the pop-up menu.  Use the `--alternate-editor=' or `-a'
     options if Emacs might not be running (or not running as a server)
     when `emacsclient' is invoked--that will always give you an
     editor.  When invoked via `emacsclient', Emacs will start in the
     current directory of the program that invoked `emacsclient'.

   Note that, due to limitations of MS-Windows, Emacs cannot have both
GUI and text-mode frames in the same session.  It also cannot open
text-mode frames on more than a single "Command Prompt" window, because
each Windows program can have only one console at any given time.  For
these reasons, if you invoke `emacsclient' with the `-c' option, and
the Emacs server runs in a text-mode session, Emacs will always create
a new text-mode frame in the same "Command Prompt" window where it was
started; a GUI frame will be created only if the server runs in a GUI
session.  Similarly, if you invoke `emacsclient' with the `-t' option,
Emacs will create a GUI frame if the server runs in a GUI session, or a
text-mode frame when the session runs in text mode in a "Command Prompt"
window.  *Note emacsclient Options::.


File: emacs,  Node: Text and Binary,  Next: Windows Files,  Prev: Windows Startup,  Up: Microsoft Windows

G.2 Text Files and Binary Files
===============================

GNU Emacs uses newline characters to separate text lines.  This is the
convention used on GNU, Unix, and other Posix-compliant systems.

   By contrast, MS-DOS and MS-Windows normally use carriage-return
linefeed, a two-character sequence, to separate text lines.  (Linefeed
is the same character as newline.)  Therefore, convenient editing of
typical files with Emacs requires conversion of these end-of-line (EOL)
sequences.  And that is what Emacs normally does: it converts
carriage-return linefeed into newline when reading files, and converts
newline into carriage-return linefeed when writing files.  The same
mechanism that handles conversion of international character codes does
this conversion also (*note Coding Systems::).

   One consequence of this special format-conversion of most files is
that character positions as reported by Emacs (*note Position Info::) do
not agree with the file size information known to the operating system.

   In addition, if Emacs recognizes from a file's contents that it uses
newline rather than carriage-return linefeed as its line separator, it
does not perform EOL conversion when reading or writing that file.
Thus, you can read and edit files from GNU and Unix systems on MS-DOS
with no special effort, and they will retain their Unix-style
end-of-line convention after you edit them.

   The mode line indicates whether end-of-line translation was used for
the current buffer.  If MS-DOS end-of-line translation is in use for the
buffer, the MS-Windows build of Emacs displays a backslash `\' after
the coding system mnemonic near the beginning of the mode line (*note
Mode Line::).  If no EOL translation was performed, the string `(Unix)'
is displayed instead of the backslash, to alert you that the file's EOL
format is not the usual carriage-return linefeed.

   To visit a file and specify whether it uses DOS-style or Unix-style
end-of-line, specify a coding system (*note Text Coding::).  For
example, `C-x <RET> c unix <RET> C-x C-f foobar.txt' visits the file
`foobar.txt' without converting the EOLs; if some line ends with a
carriage-return linefeed pair, Emacs will display `^M' at the end of
that line.  Similarly, you can direct Emacs to save a buffer in a
specified EOL format with the `C-x <RET> f' command.  For example, to
save a buffer with Unix EOL format, type `C-x <RET> f unix <RET> C-x
C-s'.  If you visit a file with DOS EOL conversion, then save it with
Unix EOL format, that effectively converts the file to Unix EOL style,
like the `dos2unix' program.

   When you use NFS, Samba, or some other similar method to access file
systems that reside on computers using GNU or Unix systems, Emacs
should not perform end-of-line translation on any files in these file
systems--not even when you create a new file.  To request this,
designate these file systems as "untranslated" file systems by calling
the function `add-untranslated-filesystem'.  It takes one argument: the
file system name, including a drive letter and optionally a directory.
For example,

     (add-untranslated-filesystem "Z:")

designates drive Z as an untranslated file system, and

     (add-untranslated-filesystem "Z:\\foo")

designates directory `\foo' on drive Z as an untranslated file system.

   Most often you would use `add-untranslated-filesystem' in your
`.emacs' file, or in `site-start.el' so that all the users at your site
get the benefit of it.

   To countermand the effect of `add-untranslated-filesystem', use the
function `remove-untranslated-filesystem'.  This function takes one
argument, which should be a string just like the one that was used
previously with `add-untranslated-filesystem'.

   Designating a file system as untranslated does not affect character
set conversion, only end-of-line conversion.  Essentially, it directs
Emacs to create new files with the Unix-style convention of using
newline at the end of a line.  *Note Coding Systems::.

   Some kinds of files should not be converted at all, because their
contents are not really text.  Therefore, Emacs on MS-Windows
distinguishes certain files as "binary files".  (This distinction is
not part of MS-Windows; it is made by Emacs only.)  Binary files
include executable programs, compressed archives, etc.  Emacs uses the
file name to decide whether to treat a file as binary: the variable
`file-name-buffer-file-type-alist' defines the file-name patterns that
indicate binary files.  If a file name matches one of the patterns for
binary files (those whose associations are of the type `(PATTERN . t)',
Emacs reads and writes that file using the `no-conversion' coding
system (*note Coding Systems::) which turns off _all_ coding-system
conversions, not only the EOL conversion.
`file-name-buffer-file-type-alist' also includes file-name patterns for
files which are known to be Windows-style text files with
carriage-return linefeed EOL format, such as `CONFIG.SYS'; Emacs always
writes those files with Windows-style EOLs.

   If a file that belongs to an untranslated file system matches one of
the file-name patterns in `file-name-buffer-file-type-alist', the EOL
conversion is determined by `file-name-buffer-file-type-alist'.


File: emacs,  Node: Windows Files,  Next: ls in Lisp,  Prev: Text and Binary,  Up: Microsoft Windows

G.3 File Names on MS-Windows
============================

MS-Windows and MS-DOS normally use a backslash, `\', to separate name
units within a file name, instead of the slash used on other systems.
Emacs on MS-DOS/MS-Windows permits use of either slash or backslash,
and also knows about drive letters in file names.

   On MS-DOS/MS-Windows, file names are case-insensitive, so Emacs by
default ignores letter-case in file names during completion.

   The variable `w32-get-true-file-attributes' controls whether Emacs
should issue additional system calls to determine more accurately file
attributes in primitives like `file-attributes' and
`directory-files-and-attributes'.  These additional calls are needed to
report correct file ownership, link counts and file types for special
files such as pipes.  Without these system calls, file ownership will
be attributed to the current user, link counts will be always reported
as 1, and special files will be reported as regular files.

   If the value of this variable is `local' (the default), Emacs will
issue these additional system calls only for files on local fixed
drives.  Any other non-`nil' value means do this even for removable and
remote volumes, where this could potentially slow down Dired and other
related features.  The value of `nil' means never issue those system
calls.  Non-`nil' values are more useful on NTFS volumes, which support
hard links and file security, than on FAT, FAT32, and XFAT volumes.


File: emacs,  Node: ls in Lisp,  Next: Windows HOME,  Prev: Windows Files,  Up: Microsoft Windows

G.4 Emulation of `ls' on MS-Windows
===================================

Dired normally uses the external program `ls' to produce the directory
listing displayed in Dired buffers (*note Dired::).  However,
MS-Windows and MS-DOS systems don't come with such a program, although
several ports of GNU `ls' are available.  Therefore, Emacs on those
systems _emulates_ `ls' in Lisp, by using the `ls-lisp.el' package.
While `ls-lisp.el' provides a reasonably full emulation of `ls', there
are some options and features peculiar to that emulation; they are
described in this section.

   The `ls' emulation supports many of the `ls' switches, but it
doesn't support all of them.  Here's the list of the switches it does
support: `-A', `-a', `-B', `-C', `-c', `-G', `-g', `-h', `-i', `-n',
`-R', `-r', `-S', `-s', `-t', `-U', `-u', and `-X'.  The `-F' switch is
partially supported (it appends the character that classifies the file,
but does not prevent symlink following).

   On MS-Windows and MS-DOS, `ls-lisp.el' is preloaded when Emacs is
built, so the Lisp emulation of `ls' is always used on those platforms.
If you have a ported `ls', setting
`ls-lisp-use-insert-directory-program' to a non-`nil' value will revert
to using an external program named by the variable
`insert-directory-program'.

   By default, `ls-lisp.el' uses a case-sensitive sort order for the
directory listing it produces; this is so the listing looks the same as
on other platforms.  If you wish that the files be sorted in
case-insensitive order, set the variable `ls-lisp-ignore-case' to a
non-`nil' value.

   By default, files and subdirectories are sorted together, to emulate
the behavior of `ls'.  However, native MS-Windows/MS-DOS file managers
list the directories before the files; if you want that behavior,
customize the option `ls-lisp-dirs-first' to a non-`nil' value.

   The variable `ls-lisp-verbosity' controls the file attributes that
`ls-lisp.el' displays.  The value should be a list that contains one or
more of the symbols `links', `uid', and `gid'.  `links' means display
the count of different file names that are associated with (a.k.a.
"links to") the file's data; this is only useful on NTFS volumes.
`uid' means display the numerical identifier of the user who owns the
file.  `gid' means display the numerical identifier of the file owner's
group.  The default value is `(links uid gid)' i.e. all the 3 optional
attributes are displayed.

   The variable `ls-lisp-emulation' controls the flavor of the `ls'
emulation by setting the defaults for the 3 options described above:
`ls-lisp-ignore-case', `ls-lisp-dirs-first', and `ls-lisp-verbosity'.
The value of this option can be one of the following symbols:

`GNU'
`nil'
     Emulate GNU systems; this is the default.  This sets
     `ls-lisp-ignore-case' and `ls-lisp-dirs-first' to `nil', and
     `ls-lisp-verbosity' to `(links uid gid)'.

`UNIX'
     Emulate Unix systems.  Like `GNU', but sets `ls-lisp-verbosity' to
     `(links uid)'.

`MacOS'
     Emulate MacOS.  Sets `ls-lisp-ignore-case' to `t', and
     `ls-lisp-dirs-first' and `ls-lisp-verbosity' to `nil'.

`MS-Windows'
     Emulate MS-Windows.  Sets `ls-lisp-ignore-case' and
     `ls-lisp-dirs-first' to `t', and `ls-lisp-verbosity' to `(links)'
     on Windows NT/2K/XP/2K3 and to `nil' on Windows 9X.  Note that the
     default emulation is _not_ `MS-Windows', even on Windows, since
     many users of Emacs on those platforms prefer the GNU defaults.

Any other value of `ls-lisp-emulation' means the same as `GNU'.
Customizing this option calls the function `ls-lisp-set-options' to
update the 3 dependent options as needed.  If you change the value of
this variable without using customize after `ls-lisp.el' is loaded
(note that it is preloaded on MS-Windows and MS-DOS), you can call that
function manually for the same result.

   The variable `ls-lisp-support-shell-wildcards' controls how
file-name patterns are supported: if it is non-`nil' (the default),
they are treated as shell-style wildcards; otherwise they are treated
as Emacs regular expressions.

   The variable `ls-lisp-format-time-list' defines how to format the
date and time of files.  _The value of this variable is ignored_,
unless Emacs cannot determine the current locale.  (However, if the
value of `ls-lisp-use-localized-time-format' is non-`nil', Emacs obeys
`ls-lisp-format-time-list' even if the current locale is available; see
below.)

   The value of `ls-lisp-format-time-list' is a list of 2 strings.  The
first string is used if the file was modified within the current year,
while the second string is used for older files.  In each of these two
strings you can use `%'-sequences to substitute parts of the time.  For
example:
     ("%b %e %H:%M" "%b %e  %Y")

Note that the strings substituted for these `%'-sequences depend on the
current locale.  *Note Time Parsing: (elisp)Time Parsing, for more
about format time specs.

   Normally, Emacs formats the file time stamps in either traditional
or ISO-style time format.  However, if the value of the variable
`ls-lisp-use-localized-time-format' is non-`nil', Emacs formats file
time stamps according to what `ls-lisp-format-time-list' specifies.
The `%'-sequences in `ls-lisp-format-time-list' produce
locale-dependent month and day names, which might cause misalignment of
columns in Dired display.


File: emacs,  Node: Windows HOME,  Next: Windows Keyboard,  Prev: ls in Lisp,  Up: Microsoft Windows

G.5 HOME and Startup Directories on MS-Windows
==============================================

The Windows equivalent of `HOME' is the "user-specific application data
directory".  The actual location depends on the Windows version;
typical values are `C:\Documents and Settings\USERNAME\Application
Data' on Windows 2000/XP/2K3, `C:\Users\USERNAME\AppData\Roaming' on
Windows Vista/7/2008, and either `C:\WINDOWS\Application Data' or
`C:\WINDOWS\Profiles\USERNAME\Application Data' on Windows 9X/ME.  If
this directory does not exist or cannot be accessed, Emacs falls back
to `C:\' as the default value of `HOME'.

   You can override this default value of `HOME' by explicitly setting
the environment variable `HOME' to point to any directory on your
system.  `HOME' can be set either from the command shell prompt or from
`Properties' dialog of `My Computer'.  `HOME' can also be set in the
system registry, *note MS-Windows Registry::.

   For compatibility with older versions of Emacs(1), if there is a
file named `.emacs' in `C:\', the root directory of drive `C:', and
`HOME' is set neither in the environment nor in the Registry, Emacs
will treat `C:\' as the default `HOME' location, and will not look in
the application data directory, even if it exists.  Note that only
`.emacs' is looked for in `C:\'; the older name `_emacs' (see below) is
not.  This use of `C:\.emacs' to define `HOME' is deprecated.

   Whatever the final place is, Emacs sets the internal value of the
`HOME' environment variable to point to it, and it will use that
location for other files and directories it normally looks for or
creates in your home directory.

   You can always find out what Emacs thinks is your home directory's
location by typing `C-x d ~/ <RET>'.  This should present the list of
files in the home directory, and show its full name on the first line.
Likewise, to visit your init file, type `C-x C-f ~/.emacs <RET>'
(assuming the file's name is `.emacs').

   The home directory is where your init file is stored.  It can have
any name mentioned in *note Init File::.

   Because MS-DOS does not allow file names with leading dots, and
older Windows systems made it hard to create files with such names, the
Windows port of Emacs supports an init file name `_emacs', if such a
file exists in the home directory and `.emacs' does not.  This name is
considered obsolete.

   ---------- Footnotes ----------

   (1) Older versions of Emacs didn't check the application data
directory.


File: emacs,  Node: Windows Keyboard,  Next: Windows Mouse,  Prev: Windows HOME,  Up: Microsoft Windows

G.6 Keyboard Usage on MS-Windows
================================

This section describes the Windows-specific features related to
keyboard input in Emacs.

   Many key combinations (known as "keyboard shortcuts") that have
conventional uses in MS-Windows programs conflict with traditional
Emacs key bindings.  (These Emacs key bindings were established years
before Microsoft was founded.)  Examples of conflicts include `C-c',
`C-x', `C-z', `C-a', and `W-<SPC>'.  You can redefine some of them with
meanings more like the MS-Windows meanings by enabling CUA Mode (*note
CUA Bindings::).

   The <F10> key on Windows activates the menu bar in a way that makes
it possible to use the menus without a mouse.  In this mode, the arrow
keys traverse the menus, <RET> selects a highlighted menu item, and
<ESC> closes the menu.

   By default, the key labeled <Alt> is mapped as the <META> key.  If
you wish it to produce the `Alt' modifier instead, set the variable
`w32-alt-is-meta' to a `nil' value.

   MS-Windows reserves certain key combinations, such as `Alt-<TAB>',
for its own use.  These key combinations are intercepted by the system
before Emacs can see them.  You can use the `w32-register-hot-key'
function to allow a key sequence to be seen by Emacs instead of being
grabbed by Windows.  This functions registers a key sequence as a "hot
key", overriding the special meaning of that key sequence for Windows.
(MS-Windows is told that the key sequence is a hot key only when one of
the Emacs windows has focus, so that the special keys still have their
usual meaning for other Windows applications.)

   The argument to `w32-register-hot-key' must be a single key, with or
without modifiers, in vector form that would be acceptable to
`define-key'.  The meta modifier is interpreted as the <ALT> key if
`w32-alt-is-meta' is `t' (the default), and the hyper modifier is
always interpreted as the Windows key (usually labeled with <start> and
the Windows logo).  If the function succeeds in registering the key
sequence, it returns the hotkey ID, a number; otherwise it returns
`nil'.

   For example, `(w32-register-hot-key [M-tab])' lets you use `M-TAB'
normally in Emacs; for instance, to complete the word or symbol at
point at top level, or to complete the current search string against
previously sought strings during incremental search.

   The function `w32-unregister-hot-key' reverses the effect of
`w32-register-hot-key' for its argument key sequence.

   By default, the <CapsLock> key only affects normal character keys
(it converts lower-case characters to their upper-case variants).
However, if you set the variable `w32-capslock-is-shiftlock' to a
non-`nil' value, the <CapsLock> key will affect non-character keys as
well, as if you pressed the <Shift> key while typing the non-character
key.

   If the variable `w32-enable-caps-lock' is set to a `nil' value, the
<CapsLock> key produces the symbol `capslock' instead of the shifted
version of they keys.  The default value is `t'.

   Similarly, if `w32-enable-num-lock' is `nil', the <NumLock> key will
produce the symbol `kp-numlock'.  The default is `t', which causes
<NumLock> to work as expected: toggle the meaning of the keys on the
numeric keypad.

   The variable `w32-apps-modifier' controls the effect of the <Apps>
key (usually located between the right <Alt> and the right <Ctrl>
keys).  Its value can be one of the symbols `hyper', `super', `meta',
`alt', `control', or `shift' for the respective modifier, or `nil' to
appear as the key `apps'.  The default is `nil'.

   The variable `w32-lwindow-modifier' determines the effect of the
left Windows key (usually labeled with <start> and the Windows logo).
If its value is `nil' (the default), the key will produce the symbol
`lwindow'.  Setting it to one of the symbols `hyper', `super', `meta',
`alt', `control', or `shift' will produce the respective modifier.  A
similar variable `w32-rwindow-modifier' controls the effect of the right
Windows key, and `w32-scroll-lock-modifier' does the same for the
<ScrLock> key.  If these variables are set to `nil', the right Windows
key produces the symbol `rwindow' and <ScrLock> produces the symbol
`scroll'.

   Emacs compiled as a native Windows application normally turns off
the Windows feature that tapping the <ALT> key invokes the Windows
menu.  The reason is that the <ALT> serves as <META> in Emacs.  When
using Emacs, users often press the <META> key temporarily and then
change their minds; if this has the effect of bringing up the Windows
menu, it alters the meaning of subsequent commands.  Many users find
this frustrating.

   You can re-enable Windows's default handling of tapping the <ALT>
key by setting `w32-pass-alt-to-system' to a non-`nil' value.

   The variables `w32-pass-lwindow-to-system' and
`w32-pass-rwindow-to-system' determine whether the respective keys are
passed to Windows or swallowed by Emacs.  If the value is `nil', the
respective key is silently swallowed by Emacs, otherwise it is passed
to Windows.  The default is `t' for both of these variables.  Passing
each of these keys to Windows produces its normal effect: for example,
`<Lwindow>' opens the `Start' menu, etc.(1)

   The variable `w32-recognize-altgr' controls whether the <AltGr> key
(if it exists on your keyboard), or its equivalent, the combination of
the right <Alt> and left <Ctrl> keys pressed together, is recognized as
the <AltGr> key.  The default is `t', which means these keys produce
`AltGr'; setting it to `nil' causes <AltGr> or the equivalent key
combination to be interpreted as the combination of <CTRL> and <META>
modifiers.

   ---------- Footnotes ----------

   (1) Some combinations of the "Windows" keys with other keys are
caught by Windows at a low level in a way that Emacs currently cannot
prevent.  For example, `<Lwindow> r' always pops up the Windows `Run'
dialog.  Customizing the value of `w32-phantom-key-code' might help in
some cases, though.


File: emacs,  Node: Windows Mouse,  Next: Windows Processes,  Prev: Windows Keyboard,  Up: Microsoft Windows

G.7 Mouse Usage on MS-Windows
=============================

This section describes the Windows-specific variables related to the
mouse.

   The variable `w32-mouse-button-tolerance' specifies the time
interval, in milliseconds, for faking middle mouse button press on
2-button mice.  If both mouse buttons are depressed within this time
interval, Emacs generates a middle mouse button click event instead of
a double click on one of the buttons.

   If the variable `w32-pass-extra-mouse-buttons-to-system' is
non-`nil', Emacs passes the fourth and fifth mouse buttons to Windows.

   The variable `w32-swap-mouse-buttons' controls which of the 3 mouse
buttons generates the `mouse-2' events.  When it is `nil' (the
default), the middle button generates `mouse-2' and the right button
generates `mouse-3' events.  If this variable is non-`nil', the roles
of these two buttons are reversed.


File: emacs,  Node: Windows Processes,  Next: Windows Printing,  Prev: Windows Mouse,  Up: Microsoft Windows

G.8 Subprocesses on Windows 9X/ME and Windows NT/2K/XP
======================================================

Emacs compiled as a native Windows application (as opposed to the DOS
version) includes full support for asynchronous subprocesses.  In the
Windows version, synchronous and asynchronous subprocesses work fine on
both Windows 9X/ME and Windows NT/2K/XP as long as you run only 32-bit
Windows applications.  However, when you run a DOS application in a
subprocess, you may encounter problems or be unable to run the
application at all; and if you run two DOS applications at the same
time in two subprocesses, you may have to reboot your system.

   Since the standard command interpreter (and most command line
utilities) on Windows 9X are DOS applications, these problems are
significant when using that system.  But there's nothing we can do
about them; only Microsoft can fix them.

   If you run just one DOS application subprocess, the subprocess should
work as expected as long as it is "well-behaved" and does not perform
direct screen access or other unusual actions.  If you have a CPU
monitor application, your machine will appear to be 100% busy even when
the DOS application is idle, but this is only an artifact of the way CPU
monitors measure processor load.

   You must terminate the DOS application before you start any other DOS
application in a different subprocess.  Emacs is unable to interrupt or
terminate a DOS subprocess.  The only way you can terminate such a
subprocess is by giving it a command that tells its program to exit.

   If you attempt to run two DOS applications at the same time in
separate subprocesses, the second one that is started will be suspended
until the first one finishes, even if either or both of them are
asynchronous.

   If you can go to the first subprocess, and tell it to exit, the
second subprocess should continue normally.  However, if the second
subprocess is synchronous, Emacs itself will be hung until the first
subprocess finishes.  If it will not finish without user input, then
you have no choice but to reboot if you are running on Windows 9X.  If
you are running on Windows NT/2K/XP, you can use a process viewer
application to kill the appropriate instance of NTVDM instead (this
will terminate both DOS subprocesses).

   If you have to reboot Windows 9X in this situation, do not use the
`Shutdown' command on the `Start' menu; that usually hangs the system.
Instead, type `CTL-ALT-<DEL>' and then choose `Shutdown'.  That usually
works, although it may take a few minutes to do its job.

   The variable `w32-quote-process-args' controls how Emacs quotes the
process arguments.  Non-`nil' means quote with the `"' character.  If
the value is a character, Emacs uses that character to escape any quote
characters that appear; otherwise it chooses a suitable escape
character based on the type of the program.

   The function `w32-shell-execute' can be useful for writing
customized commands that run MS-Windows applications registered to
handle a certain standard Windows operation for a specific type of
document or file.  This function is a wrapper around the Windows
`ShellExecute' API.  See the MS-Windows API documentation for more
details.


File: emacs,  Node: Windows Printing,  Next: Windows Fonts,  Prev: Windows Processes,  Up: Microsoft Windows

G.9 Printing and MS-Windows
===========================

Printing commands, such as `lpr-buffer' (*note Printing::) and
`ps-print-buffer' (*note PostScript::) work in MS-DOS and MS-Windows by
sending the output to one of the printer ports, if a Posix-style `lpr'
program is unavailable.  The same Emacs variables control printing on
all systems, but in some cases they have different default values on
MS-DOS and MS-Windows.

   Emacs on MS Windows attempts to determine your default printer
automatically (using the function `default-printer-name').  But in some
rare cases this can fail, or you may wish to use a different printer
from within Emacs.  The rest of this section explains how to tell Emacs
which printer to use.

   If you want to use your local printer, then set the Lisp variable
`lpr-command' to `""' (its default value on Windows) and `printer-name'
to the name of the printer port--for example, `"PRN"', the usual local
printer port, or `"LPT2"', or `"COM1"' for a serial printer.  You can
also set `printer-name' to a file name, in which case "printed" output
is actually appended to that file.  If you set `printer-name' to
`"NUL"', printed output is silently discarded (sent to the system null
device).

   You can also use a printer shared by another machine by setting
`printer-name' to the UNC share name for that printer--for example,
`"//joes_pc/hp4si"'.  (It doesn't matter whether you use forward
slashes or backslashes here.)  To find out the names of shared
printers, run the command `net view' from the command prompt to obtain
a list of servers, and `net view SERVER-NAME' to see the names of
printers (and directories) shared by that server.  Alternatively, click
the `Network Neighborhood' icon on your desktop, and look for machines
that share their printers via the network.

   If the printer doesn't appear in the output of `net view', or if
setting `printer-name' to the UNC share name doesn't produce a hardcopy
on that printer, you can use the `net use' command to connect a local
print port such as `"LPT2"' to the networked printer.  For example,
typing `net use LPT2: \\joes_pc\hp4si'(1) causes Windows to "capture"
the `LPT2' port and redirect the printed material to the printer
connected to the machine `joes_pc'.  After this command, setting
`printer-name' to `"LPT2"' should produce the hardcopy on the networked
printer.

   With some varieties of Windows network software, you can instruct
Windows to capture a specific printer port such as `"LPT2"', and
redirect it to a networked printer via the `Control Panel->Printers'
applet instead of `net use'.

   If you set `printer-name' to a file name, it's best to use an
absolute file name.  Emacs changes the working directory according to
the default directory of the current buffer, so if the file name in
`printer-name' is relative, you will end up with several such files,
each one in the directory of the buffer from which the printing was
done.

   If the value of `printer-name' is correct, but printing does not
produce the hardcopy on your printer, it is possible that your printer
does not support printing plain text (some cheap printers omit this
functionality).  In that case, try the PostScript print commands,
described below.

   The commands `print-buffer' and `print-region' call the `pr'
program, or use special switches to the `lpr' program, to produce
headers on each printed page.  MS-DOS and MS-Windows don't normally
have these programs, so by default, the variable `lpr-headers-switches'
is set so that the requests to print page headers are silently ignored.
Thus, `print-buffer' and `print-region' produce the same output as
`lpr-buffer' and `lpr-region', respectively.  If you do have a suitable
`pr' program (for example, from GNU Coreutils), set
`lpr-headers-switches' to `nil'; Emacs will then call `pr' to produce
the page headers, and print the resulting output as specified by
`printer-name'.

   Finally, if you do have an `lpr' work-alike, you can set the
variable `lpr-command' to `"lpr"'.  Then Emacs will use `lpr' for
printing, as on other systems.  (If the name of the program isn't
`lpr', set `lpr-command' to the appropriate value.)  The variable
`lpr-switches' has its standard meaning when `lpr-command' is not `""'.
If the variable `printer-name' has a string value, it is used as the
value for the `-P' option to `lpr', as on Unix.

   A parallel set of variables, `ps-lpr-command', `ps-lpr-switches',
and `ps-printer-name' (*note PostScript Variables::), defines how
PostScript files should be printed.  These variables are used in the
same way as the corresponding variables described above for
non-PostScript printing.  Thus, the value of `ps-printer-name' is used
as the name of the device (or file) to which PostScript output is sent,
just as `printer-name' is used for non-PostScript printing.  (There are
two distinct sets of variables in case you have two printers attached
to two different ports, and only one of them is a PostScript printer.)

   The default value of the variable `ps-lpr-command' is `""', which
causes PostScript output to be sent to the printer port specified by
`ps-printer-name'; but `ps-lpr-command' can also be set to the name of
a program which will accept PostScript files.  Thus, if you have a
non-PostScript printer, you can set this variable to the name of a
PostScript interpreter program (such as Ghostscript).  Any switches
that need to be passed to the interpreter program are specified using
`ps-lpr-switches'.  (If the value of `ps-printer-name' is a string, it
will be added to the list of switches as the value for the `-P' option.
This is probably only useful if you are using `lpr', so when using an
interpreter typically you would set `ps-printer-name' to something
other than a string so it is ignored.)

   For example, to use Ghostscript for printing on the system's default
printer, put this in your `.emacs' file:

     (setq ps-printer-name t)
     (setq ps-lpr-command "D:/gs6.01/bin/gswin32c.exe")
     (setq ps-lpr-switches '("-q" "-dNOPAUSE" "-dBATCH"
                             "-sDEVICE=mswinpr2"
                             "-sPAPERSIZE=a4"))

(This assumes that Ghostscript is installed in the `D:/gs6.01'
directory.)

   ---------- Footnotes ----------

   (1) Note that the `net use' command requires the UNC share name to be
typed with the Windows-style backslashes, while the value of
`printer-name' can be set with either forward- or backslashes.


File: emacs,  Node: Windows Fonts,  Next: Windows Misc,  Prev: Windows Printing,  Up: Microsoft Windows

G.10 Specifying Fonts on MS-Windows
===================================

Starting with Emacs 23, fonts are specified by their name, size and
optional properties.  The format for specifying fonts comes from the
fontconfig library used in modern Free desktops:

       [Family[-PointSize]][:Option1=Value1[:Option2=Value2[...]]]

   The old XLFD based format is also supported for backwards
compatibility.

   Emacs 23 and later supports a number of font backends.  Currently,
the `gdi' and `uniscribe' backends are supported on Windows.  The `gdi'
font backend is available on all versions of Windows, and supports all
fonts that are natively supported by Windows.  The `uniscribe' font
backend is available on Windows 2000 and later, and supports TrueType
and OpenType fonts.  Some languages requiring complex layout can only
be properly supported by the Uniscribe backend.  By default, both
backends are enabled if supported, with `uniscribe' taking priority
over `gdi'.  To override that and use the GDI backend even if Uniscribe
is available, invoke Emacs with the `-xrm Emacs.fontBackend:gdi'
command-line argument, or add a `Emacs.fontBackend' resource with the
value `gdi' in the Registry under either the
`HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs' or the
`HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs' key (*note Resources::).

Optional properties common to all font backends on MS-Windows are:

`weight'
     Specifies the weight of the font.  Special values `light',
     `medium', `demibold', `bold', and `black' can be specified without
     `weight=' (e.g., `Courier New-12:bold').  Otherwise, the weight
     should be a numeric value between 100 and 900, or one of the named
     weights in `font-weight-table'.  If unspecified, a regular font is
     assumed.

`slant'
     Specifies whether the font is italic.  Special values `roman',
     `italic' and `oblique' can be specified without `slant=' (e.g.,
     `Courier New-12:italic').  Otherwise, the slant should be a
     numeric value, or one of the named slants in `font-slant-table'.
     On Windows, any slant above 150 is treated as italics, and
     anything below as roman.

`family'
     Specifies the font family, but normally this will be specified at
     the start of the font name.

`pixelsize'
     Specifies the font size in pixels.  This can be used instead of
     the point size specified after the family name.

`adstyle'
     Specifies additional style information for the font.  On
     MS-Windows, the values `mono', `sans', `serif', `script' and
     `decorative' are recognized.  These are most useful as a fallback
     with the font family left unspecified.

`registry'
     Specifies the character set registry that the font is expected to
     cover.  Most TrueType and OpenType fonts will be Unicode fonts
     that cover several national character sets, but you can narrow
     down the selection of fonts to those that support a particular
     character set by using a specific registry from
     `w32-charset-info-alist' here.

`spacing'
     Specifies how the font is spaced.  The `p' spacing specifies a
     proportional font, and `m' or `c' specify a monospaced font.

`foundry'
     Not used on Windows, but for informational purposes and to prevent
     problems with code that expects it to be set, is set internally to
     `raster' for bitmapped fonts, `outline' for scalable fonts, or
     `unknown' if the type cannot be determined as one of those.

   Options specific to `GDI' fonts:

`script'
     Specifies a Unicode subrange the font should support.

     The following scripts are recognized on Windows: `latin', `greek',
     `coptic', `cyrillic', `armenian', `hebrew', `arabic', `syriac',
     `nko', `thaana', `devanagari', `bengali', `gurmukhi', `gujarati',
     `oriya', `tamil', `telugu', `kannada', `malayam', `sinhala',
     `thai', `lao', `tibetan', `myanmar', `georgian', `hangul',
     `ethiopic', `cherokee', `canadian-aboriginal', `ogham', `runic',
     `khmer', `mongolian', `symbol', `braille', `han',
     `ideographic-description', `cjk-misc', `kana', `bopomofo',
     `kanbun', `yi', `byzantine-musical-symbol', `musical-symbol', and
     `mathematical'.

`antialias'
     Specifies the antialiasing method.  The value `none' means no
     antialiasing, `standard' means use standard antialiasing,
     `subpixel' means use subpixel antialiasing (known as Cleartype on
     Windows), and `natural' means use subpixel antialiasing with
     adjusted spacing between letters.  If unspecified, the font will
     use the system default antialiasing.


File: emacs,  Node: Windows Misc,  Next: MS-DOS,  Prev: Windows Fonts,  Up: Microsoft Windows

G.11 Miscellaneous Windows-specific features
============================================

This section describes miscellaneous Windows-specific features.

   The variable `w32-use-visible-system-caret' is a flag that
determines whether to make the system caret visible.  The default when
no screen reader software is in use is `nil', which means Emacs draws
its own cursor to indicate the position of point.  A non-`nil' value
means Emacs will indicate point location with the system caret; this
facilitates use of screen reader software, and is the default when such
software is detected when running Emacs.  When this variable is
non-`nil', other variables affecting the cursor display have no effect.

   The variable `w32-grab-focus-on-raise', if set to a non-`nil' value
causes a frame to grab focus when it is raised.  The default is `t',
which fits well with the Windows default click-to-focus policy.


File: emacs,  Node: MS-DOS,  Prev: Windows Misc,  Up: Microsoft Windows

G.12 Emacs and MS-DOS
=====================

This section briefly describes the peculiarities of using Emacs on the
MS-DOS "operating system" (also known as "MS-DOG").  Information about
peculiarities common to MS-DOS and Microsoft's current operating
systems Windows (also known as "Losedows") is in *note Microsoft
Windows::.

   If you build Emacs for MS-DOS, the binary will also run on Windows
3.X, Windows NT, Windows 9X/ME, Windows 2000/XP, or OS/2 as a DOS
application; all of this chapter applies for all of those systems, if
you use an Emacs that was built for MS-DOS.

   *Note Text and Binary::, for information about Emacs's special
handling of text files under MS-DOS (and Windows).

* Menu:

* Keyboard: MS-DOS Keyboard.   Keyboard conventions on MS-DOS.
* Mouse: MS-DOS Mouse.         Mouse conventions on MS-DOS.
* Display: MS-DOS Display.     Fonts, frames and display size on MS-DOS.
* Files: MS-DOS File Names.    File name conventions on MS-DOS.
* Printing: MS-DOS Printing.   Printing specifics on MS-DOS.
* I18N: MS-DOS and MULE.       Support for internationalization on MS-DOS.
* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.


File: emacs,  Node: MS-DOS Keyboard,  Next: MS-DOS Mouse,  Up: MS-DOS

G.12.1 Keyboard Usage on MS-DOS
-------------------------------

The key that is called <DEL> in Emacs (because that's how it is
designated on most workstations) is known as <BS> (backspace) on a PC.
That is why the PC-specific terminal initialization remaps the <BS> key
to act as <DEL>; the <DELETE> key is remapped to act as `C-d' for the
same reasons.

   Emacs built for MS-DOS recognizes `C-<BREAK>' as a quit character,
just like `C-g'.  This is because Emacs cannot detect that you have
typed `C-g' until it is ready for more input.  As a consequence, you
cannot use `C-g' to stop a running command (*note Quitting::).  By
contrast, `C-<BREAK>' _is_ detected as soon as you type it (as `C-g' is
on other systems), so it can be used to stop a running command and for
emergency escape (*note Emergency Escape::).

   The PC keyboard maps use the left <ALT> key as the <META> key.  You
have two choices for emulating the <SUPER> and <HYPER> keys: choose
either the right <CTRL> key or the right <ALT> key by setting the
variables `dos-hyper-key' and `dos-super-key' to 1 or 2 respectively.
If neither `dos-super-key' nor `dos-hyper-key' is 1, then by default
the right <ALT> key is also mapped to the <META> key.  However, if the
MS-DOS international keyboard support program `KEYB.COM' is installed,
Emacs will _not_ map the right <ALT> to <META>, since it is used for
accessing characters like `~' and `@' on non-US keyboard layouts; in
this case, you may only use the left <ALT> as <META> key.

   The variable `dos-keypad-mode' is a flag variable that controls what
key codes are returned by keys in the numeric keypad.  You can also
define the keypad <ENTER> key to act like `C-j', by putting the
following line into your `_emacs' file:

     ;; Make the <ENTER> key from the numeric keypad act as `C-j'.
     (define-key function-key-map [kp-enter] [?\C-j])


File: emacs,  Node: MS-DOS Mouse,  Next: MS-DOS Display,  Prev: MS-DOS Keyboard,  Up: MS-DOS

G.12.2 Mouse Usage on MS-DOS
----------------------------

Emacs on MS-DOS supports a mouse (on the default terminal only).  The
mouse commands work as documented, including those that use menus and
the menu bar (*note Menu Bar::).   Scroll bars don't work in MS-DOS
Emacs.  PC mice usually have only two buttons; these act as `Mouse-1'
and `Mouse-2', but if you press both of them together, that has the
effect of `Mouse-3'.  If the mouse does have 3 buttons, Emacs detects
that at startup, and all the 3 buttons function normally, as on X.

   Help strings for menu-bar and pop-up menus are displayed in the echo
area when the mouse pointer moves across the menu items.  Highlighting
of mouse-sensitive text (*note Mouse References::) is also supported.

   Some versions of mouse drivers don't report the number of mouse
buttons correctly.  For example, mice with a wheel report that they
have 3 buttons, but only 2 of them are passed to Emacs; the clicks on
the wheel, which serves as the middle button, are not passed.  In these
cases, you can use the `M-x msdos-set-mouse-buttons' command to tell
Emacs how many mouse buttons to expect.  You could make such a setting
permanent by adding this fragment to your `_emacs' init file:

     ;; Treat the mouse like a 2-button mouse.
     (msdos-set-mouse-buttons 2)

   Emacs built for MS-DOS supports clipboard operations when it runs on
Windows.  Commands that put text on the kill ring, or yank text from
the ring, check the Windows clipboard first, just as Emacs does on the
X Window System (*note Mouse Commands::).  Only the primary selection
and the cut buffer are supported by MS-DOS Emacs on Windows; the
secondary selection always appears as empty.

   Due to the way clipboard access is implemented by Windows, the
length of text you can put into the clipboard is limited by the amount
of free DOS memory that is available to Emacs.  Usually, up to 620KB of
text can be put into the clipboard, but this limit depends on the system
configuration and is lower if you run Emacs as a subprocess of another
program.  If the killed text does not fit, Emacs outputs a message
saying so, and does not put the text into the clipboard.

   Null characters also cannot be put into the Windows clipboard.  If
the killed text includes null characters, Emacs does not put such text
into the clipboard, and displays in the echo area a message to that
effect.

   The variable `dos-display-scancodes', when non-`nil', directs Emacs
to display the ASCII value and the keyboard scan code of each
keystroke; this feature serves as a complement to the `view-lossage'
command, for debugging.


File: emacs,  Node: MS-DOS Display,  Next: MS-DOS File Names,  Prev: MS-DOS Mouse,  Up: MS-DOS

G.12.3 Display on MS-DOS
------------------------

Display on MS-DOS cannot use font variants, like bold or italic, but it
does support multiple faces, each of which can specify a foreground and
a background color.  Therefore, you can get the full functionality of
Emacs packages that use fonts (such as `font-lock', Enriched Text mode,
and others) by defining the relevant faces to use different colors.
Use the `list-colors-display' command (*note Colors::) and the
`list-faces-display' command (*note Faces::) to see what colors and
faces are available and what they look like.

   *Note MS-DOS and MULE::, later in this chapter, for information on
how Emacs displays glyphs and characters that aren't supported by the
native font built into the DOS display.

   When Emacs starts, it changes the cursor shape to a solid box.  This
is for compatibility with other systems, where the box cursor is the
default in Emacs.  This default shape can be changed to a bar by
specifying the `cursor-type' parameter in the variable
`default-frame-alist' (*note Creating Frames::).  The MS-DOS terminal
doesn't support a vertical-bar cursor, so the bar cursor is horizontal,
and the `WIDTH' parameter, if specified by the frame parameters,
actually determines its height.  For this reason, the `bar' and `hbar'
cursor types produce the same effect on MS-DOS.  As an extension, the
bar cursor specification can include the starting scan line of the
cursor as well as its width, like this:

      '(cursor-type bar WIDTH . START)

In addition, if the WIDTH parameter is negative, the cursor bar begins
at the top of the character cell.

   The MS-DOS terminal can only display a single frame at a time.  The
Emacs frame facilities work on MS-DOS much as they do on text terminals
(*note Frames::).  When you run Emacs from a DOS window on MS-Windows,
you can make the visible frame smaller than the full screen, but Emacs
still cannot display more than a single frame at a time.

   The `dos-mode4350' command switches the display to 43 or 50 lines,
depending on your hardware; the `dos-mode25' command switches to the
default 80x25 screen size.

   By default, Emacs only knows how to set screen sizes of 80 columns by
25, 28, 35, 40, 43 or 50 rows.  However, if your video adapter has
special video modes that will switch the display to other sizes, you can
have Emacs support those too.  When you ask Emacs to switch the frame to
N rows by M columns dimensions, it checks if there is a variable called
`screen-dimensions-NxM', and if so, uses its value (which must be an
integer) as the video mode to switch to.  (Emacs switches to that video
mode by calling the BIOS `Set Video Mode' function with the value of
`screen-dimensions-NxM' in the `AL' register.)  For example, suppose
your adapter will switch to 66x80 dimensions when put into video mode
85.  Then you can make Emacs support this screen size by putting the
following into your `_emacs' file:

     (setq screen-dimensions-66x80 85)

   Since Emacs on MS-DOS can only set the frame size to specific
supported dimensions, it cannot honor every possible frame resizing
request.  When an unsupported size is requested, Emacs chooses the next
larger supported size beyond the specified size.  For example, if you
ask for 36x80 frame, you will get 40x80 instead.

   The variables `screen-dimensions-NxM' are used only when they
exactly match the specified size; the search for the next larger
supported size ignores them.  In the above example, even if your VGA
supports 38x80 dimensions and you define a variable
`screen-dimensions-38x80' with a suitable value, you will still get
40x80 screen when you ask for a 36x80 frame.  If you want to get the
38x80 size in this case, you can do it by setting the variable named
`screen-dimensions-36x80' with the same video mode value as
`screen-dimensions-38x80'.

   Changing frame dimensions on MS-DOS has the effect of changing all
the other frames to the new dimensions.


File: emacs,  Node: MS-DOS File Names,  Next: MS-DOS Printing,  Prev: MS-DOS Display,  Up: MS-DOS

G.12.4 File Names on MS-DOS
---------------------------

On MS-DOS, file names are case-insensitive and limited to eight
characters, plus optionally a period and three more characters.  Emacs
knows enough about these limitations to handle file names that were
meant for other operating systems.  For instance, leading dots `.'  in
file names are invalid in MS-DOS, so Emacs transparently converts them
to underscores `_'; thus your default init file (*note Init File::) is
called `_emacs' on MS-DOS.  Excess characters before or after the
period are generally ignored by MS-DOS itself; thus, if you visit the
file `LongFileName.EvenLongerExtension', you will silently get
`longfile.eve', but Emacs will still display the long file name on the
mode line.  Other than that, it's up to you to specify file names which
are valid under MS-DOS; the transparent conversion as described above
only works on file names built into Emacs.

   The above restrictions on the file names on MS-DOS make it almost
impossible to construct the name of a backup file (*note Backup Names::)
without losing some of the original file name characters.  For example,
the name of a backup file for `docs.txt' is `docs.tx~' even if single
backup is used.

   If you run Emacs as a DOS application under Windows 9X, Windows ME,
or Windows 2000/XP, you can turn on support for long file names.  If
you do that, Emacs doesn't truncate file names or convert them to lower
case; instead, it uses the file names that you specify, verbatim.  To
enable long file name support, set the environment variable `LFN' to
`y' before starting Emacs.  Unfortunately, Windows NT doesn't allow DOS
programs to access long file names, so Emacs built for MS-DOS will only
see their short 8+3 aliases.

   MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
that the directory where it is installed is the value of the `HOME'
environment variable.  That is, if your Emacs binary, `emacs.exe', is
in the directory `c:/utils/emacs/bin', then Emacs acts as if `HOME'
were set to `c:/utils/emacs'.  In particular, that is where Emacs looks
for the init file `_emacs'.  With this in mind, you can use `~' in file
names as an alias for the home directory, as you would on GNU or Unix.
You can also set `HOME' variable in the environment before starting
Emacs; its value will then override the above default behavior.

   Emacs on MS-DOS handles the directory name `/dev' specially, because
of a feature in the emulator libraries of DJGPP that pretends I/O
devices have names in that directory.  We recommend that you avoid
using an actual directory named `/dev' on any disk.


File: emacs,  Node: MS-DOS Printing,  Next: MS-DOS and MULE,  Prev: MS-DOS File Names,  Up: MS-DOS

G.12.5 Printing and MS-DOS
--------------------------

Printing commands, such as `lpr-buffer' (*note Printing::) and
`ps-print-buffer' (*note PostScript::) can work on MS-DOS by sending
the output to one of the printer ports, if a Posix-style `lpr' program
is unavailable.  The same Emacs variables control printing on all
systems, but in some cases they have different default values on MS-DOS.

   *Note Windows Printing::, for details about setting up printing to a
networked printer.

   Some printers expect DOS codepage encoding of non-ASCII text, even
though they are connected to a Windows machine that uses a different
encoding for the same locale.  For example, in the Latin-1 locale, DOS
uses codepage 850 whereas Windows uses codepage 1252.  *Note MS-DOS and
MULE::.  When you print to such printers from Windows, you can use the
`C-x RET c' (`universal-coding-system-argument') command before `M-x
lpr-buffer'; Emacs will then convert the text to the DOS codepage that
you specify.  For example, `C-x RET c cp850-dos RET M-x lpr-region RET'
will print the region while converting it to the codepage 850 encoding.

   For backwards compatibility, the value of `dos-printer'
(`dos-ps-printer'), if it has a value, overrides the value of
`printer-name' (`ps-printer-name'), on MS-DOS.


File: emacs,  Node: MS-DOS and MULE,  Next: MS-DOS Processes,  Prev: MS-DOS Printing,  Up: MS-DOS

G.12.6 International Support on MS-DOS
--------------------------------------

Emacs on MS-DOS supports the same international character sets as it
does on GNU, Unix and other platforms (*note International::),
including coding systems for converting between the different character
sets.  However, due to incompatibilities between MS-DOS/MS-Windows and
other systems, there are several DOS-specific aspects of this support
that you should be aware of.  This section describes these aspects.

   The description below is largely specific to the MS-DOS port of
Emacs, especially where it talks about practical implications for Emacs
users.

`M-x dos-codepage-setup'
     Set up Emacs display and coding systems as appropriate for the
     current DOS codepage.

   MS-DOS is designed to support one character set of 256 characters at
any given time, but gives you a variety of character sets to choose
from.  The alternative character sets are known as "DOS codepages".
Each codepage includes all 128 ASCII characters, but the other 128
characters (codes 128 through 255) vary from one codepage to another.
Each DOS codepage is identified by a 3-digit number, such as 850, 862,
etc.

   In contrast to X, which lets you use several fonts at the same time,
MS-DOS normally doesn't allow use of several codepages in a single
session.  MS-DOS was designed to load a single codepage at system
startup, and require you to reboot in order to change it(1).  Much the
same limitation applies when you run DOS executables on other systems
such as MS-Windows.

   For multibyte operation on MS-DOS, Emacs needs to know which
characters the chosen DOS codepage can display.  So it queries the
system shortly after startup to get the chosen codepage number, and
stores the number in the variable `dos-codepage'.  Some systems return
the default value 437 for the current codepage, even though the actual
codepage is different.  (This typically happens when you use the
codepage built into the display hardware.)  You can specify a different
codepage for Emacs to use by setting the variable `dos-codepage' in
your init file.

   Multibyte Emacs supports only certain DOS codepages: those which can
display Far-Eastern scripts, like the Japanese codepage 932, and those
that encode a single ISO 8859 character set.

   The Far-Eastern codepages can directly display one of the MULE
character sets for these countries, so Emacs simply sets up to use the
appropriate terminal coding system that is supported by the codepage.
The special features described in the rest of this section mostly
pertain to codepages that encode ISO 8859 character sets.

   For the codepages that correspond to one of the ISO character sets,
Emacs knows the character set based on the codepage number.  Emacs
automatically creates a coding system to support reading and writing
files that use the current codepage, and uses this coding system by
default.  The name of this coding system is `cpNNN', where NNN is the
codepage number.(2)

   All the `cpNNN' coding systems use the letter `D' (for "DOS") as
their mode-line mnemonic.  Since both the terminal coding system and
the default coding system for file I/O are set to the proper `cpNNN'
coding system at startup, it is normal for the mode line on MS-DOS to
begin with `-DD\-'.  *Note Mode Line::.  Far-Eastern DOS terminals do
not use the `cpNNN' coding systems, and thus their initial mode line
looks like the Emacs default.

   Since the codepage number also indicates which script you are using,
Emacs automatically runs `set-language-environment' to select the
language environment for that script (*note Language Environments::).

   If a buffer contains a character belonging to some other ISO 8859
character set, not the one that the chosen DOS codepage supports, Emacs
displays it using a sequence of ASCII characters.  For example, if the
current codepage doesn't have a glyph for the letter `�' (small `o'
with a grave accent), it is displayed as `{`o}', where the braces serve
as a visual indication that this is a single character.  (This may look
awkward for some non-Latin characters, such as those from Greek or
Hebrew alphabets, but it is still readable by a person who knows the
language.)  Even though the character may occupy several columns on the
screen, it is really still just a single character, and all Emacs
commands treat it as one.

   MS-Windows provides its own codepages, which are different from the
DOS codepages for the same locale.  For example, DOS codepage 850
supports the same character set as Windows codepage 1252; DOS codepage
855 supports the same character set as Windows codepage 1251, etc.  The
MS-Windows version of Emacs uses the current codepage for display when
invoked with the `-nw' option.

   ---------- Footnotes ----------

   (1) Normally, one particular codepage is burnt into the display
memory, while other codepages can be installed by modifying system
configuration files, such as `CONFIG.SYS', and rebooting.  While there
is third-party software that allows changing the codepage without
rebooting, we describe here how a stock MS-DOS system behaves.

   (2) The standard Emacs coding systems for ISO 8859 are not quite
right for the purpose, because typically the DOS codepage does not
match the standard ISO character codes.  For example, the letter `�'
(`c' with cedilla) has code 231 in the standard Latin-1 character set,
but the corresponding DOS codepage 850 uses code 135 for this glyph.


File: emacs,  Node: MS-DOS Processes,  Prev: MS-DOS and MULE,  Up: MS-DOS

G.12.7 Subprocesses on MS-DOS
-----------------------------

Because MS-DOS is a single-process "operating system", asynchronous
subprocesses are not available.  In particular, Shell mode and its
variants do not work.  Most Emacs features that use asynchronous
subprocesses also don't work on MS-DOS, including Shell mode and GUD.
When in doubt, try and see; commands that don't work output an error
message saying that asynchronous processes aren't supported.

   Compilation under Emacs with `M-x compile', searching files with
`M-x grep' and displaying differences between files with `M-x diff' do
work, by running the inferior processes synchronously.  This means you
cannot do any more editing until the inferior process finishes.

   Spell checking also works, by means of special support for
synchronous invocation of the `ispell' program.  This is slower than the
asynchronous invocation on other platforms

   Instead of the Shell mode, which doesn't work on MS-DOS, you can use
the `M-x eshell' command.  This invokes the Eshell package that
implements a Posix-like shell entirely in Emacs Lisp.

   By contrast, Emacs compiled as a native Windows application *does*
support asynchronous subprocesses.  *Note Windows Processes::.

   Printing commands, such as `lpr-buffer' (*note Printing::) and
`ps-print-buffer' (*note PostScript::), work in MS-DOS by sending the
output to one of the printer ports.  *Note MS-DOS Printing::.

   When you run a subprocess synchronously on MS-DOS, make sure the
program terminates and does not try to read keyboard input.  If the
program does not terminate on its own, you will be unable to terminate
it, because MS-DOS provides no general way to terminate a process.
Pressing `C-c' or `C-<BREAK>' might sometimes help in these cases.

   Accessing files on other machines is not supported on MS-DOS.  Other
network-oriented commands such as sending mail, Web browsing, remote
login, etc., don't work either, unless network access is built into
MS-DOS with some network redirector.

   Dired on MS-DOS uses the `ls-lisp' package (*note ls in Lisp::).
Therefore, Dired on MS-DOS supports only some of the possible options
you can mention in the `dired-listing-switches' variable.  The options
that work are `-A', `-a', `-c', `-i', `-r', `-S', `-s', `-t', and `-u'.


File: emacs,  Node: Manifesto,  Prev: Microsoft Windows,  Up: Top

The GNU Manifesto
*****************

     The GNU Manifesto which appears below was written by Richard
     Stallman at the beginning of the GNU project, to ask for
     participation and support.  For the first few years, it was
     updated in minor ways to account for developments, but now it
     seems best to leave it unchanged as most people have seen it.

     Since that time, we have learned about certain common
     misunderstandings that different wording could help avoid.
     Footnotes added in 1993 help clarify these points.

     For up-to-date information about available GNU software, please see
     our web site, `http://www.gnu.org'.  For software tasks and other
     ways to contribute, see `http://www.gnu.org/help'.

What's GNU?  Gnu's Not Unix!
============================

GNU, which stands for Gnu's Not Unix, is the name for the complete
Unix-compatible software system which I am writing so that I can give it
away free to everyone who can use it.(1) Several other volunteers are
helping me.  Contributions of time, money, programs and equipment are
greatly needed.

   So far we have an Emacs text editor with Lisp for writing editor
commands, a source level debugger, a yacc-compatible parser generator,
a linker, and around 35 utilities.  A shell (command interpreter) is
nearly completed.  A new portable optimizing C compiler has compiled
itself and may be released this year.  An initial kernel exists but
many more features are needed to emulate Unix.  When the kernel and
compiler are finished, it will be possible to distribute a GNU system
suitable for program development.  We will use TeX as our text
formatter, but an nroff is being worked on.  We will use the free,
portable X window system as well.  After this we will add a portable
Common Lisp, an Empire game, a spreadsheet, and hundreds of other
things, plus on-line documentation.  We hope to supply, eventually,
everything useful that normally comes with a Unix system, and more.

   GNU will be able to run Unix programs, but will not be identical to
Unix.  We will make all improvements that are convenient, based on our
experience with other operating systems.  In particular, we plan to
have longer file names, file version numbers, a crashproof file system,
file name completion perhaps, terminal-independent display support, and
perhaps eventually a Lisp-based window system through which several
Lisp programs and ordinary Unix programs can share a screen.  Both C
and Lisp will be available as system programming languages.  We will
try to support UUCP, MIT Chaosnet, and Internet protocols for
communication.

   GNU is aimed initially at machines in the 68000/16000 class with
virtual memory, because they are the easiest machines to make it run
on.  The extra effort to make it run on smaller machines will be left
to someone who wants to use it on them.

   To avoid horrible confusion, please pronounce the `G' in the word
`GNU' when it is the name of this project.

Why I Must Write GNU
====================

I consider that the golden rule requires that if I like a program I must
share it with other people who like it.  Software sellers want to divide
the users and conquer them, making each user agree not to share with
others.  I refuse to break solidarity with other users in this way.  I
cannot in good conscience sign a nondisclosure agreement or a software
license agreement.  For years I worked within the Artificial
Intelligence Lab to resist such tendencies and other inhospitalities,
but eventually they had gone too far: I could not remain in an
institution where such things are done for me against my will.

   So that I can continue to use computers without dishonor, I have
decided to put together a sufficient body of free software so that I
will be able to get along without any software that is not free.  I
have resigned from the AI lab to deny MIT any legal excuse to prevent
me from giving GNU away.

Why GNU Will Be Compatible with Unix
====================================

Unix is not my ideal system, but it is not too bad.  The essential
features of Unix seem to be good ones, and I think I can fill in what
Unix lacks without spoiling them.  And a system compatible with Unix
would be convenient for many other people to adopt.

How GNU Will Be Available
=========================

GNU is not in the public domain.  Everyone will be permitted to modify
and redistribute GNU, but no distributor will be allowed to restrict its
further redistribution.  That is to say, proprietary modifications will
not be allowed.  I want to make sure that all versions of GNU remain
free.

Why Many Other Programmers Want to Help
=======================================

I have found many other programmers who are excited about GNU and want
to help.

   Many programmers are unhappy about the commercialization of system
software.  It may enable them to make more money, but it requires them
to feel in conflict with other programmers in general rather than feel
as comrades.  The fundamental act of friendship among programmers is the
sharing of programs; marketing arrangements now typically used
essentially forbid programmers to treat others as friends.  The
purchaser of software must choose between friendship and obeying the
law.  Naturally, many decide that friendship is more important.  But
those who believe in law often do not feel at ease with either choice.
They become cynical and think that programming is just a way of making
money.

   By working on and using GNU rather than proprietary programs, we can
be hospitable to everyone and obey the law.  In addition, GNU serves as
an example to inspire and a banner to rally others to join us in
sharing.  This can give us a feeling of harmony which is impossible if
we use software that is not free.  For about half the programmers I
talk to, this is an important happiness that money cannot replace.

How You Can Contribute
======================

I am asking computer manufacturers for donations of machines and money.
I'm asking individuals for donations of programs and work.

   One consequence you can expect if you donate machines is that GNU
will run on them at an early date.  The machines should be complete,
ready to use systems, approved for use in a residential area, and not
in need of sophisticated cooling or power.

   I have found very many programmers eager to contribute part-time
work for GNU.  For most projects, such part-time distributed work would
be very hard to coordinate; the independently-written parts would not
work together.  But for the particular task of replacing Unix, this
problem is absent.  A complete Unix system contains hundreds of utility
programs, each of which is documented separately.  Most interface
specifications are fixed by Unix compatibility.  If each contributor
can write a compatible replacement for a single Unix utility, and make
it work properly in place of the original on a Unix system, then these
utilities will work right when put together.  Even allowing for Murphy
to create a few unexpected problems, assembling these components will
be a feasible task.  (The kernel will require closer communication and
will be worked on by a small, tight group.)

   If I get donations of money, I may be able to hire a few people full
or part time.  The salary won't be high by programmers' standards, but
I'm looking for people for whom building community spirit is as
important as making money.  I view this as a way of enabling dedicated
people to devote their full energies to working on GNU by sparing them
the need to make a living in another way.

Why All Computer Users Will Benefit
===================================

Once GNU is written, everyone will be able to obtain good system
software free, just like air.(2)

   This means much more than just saving everyone the price of a Unix
license.  It means that much wasteful duplication of system programming
effort will be avoided.  This effort can go instead into advancing the
state of the art.

   Complete system sources will be available to everyone.  As a result,
a user who needs changes in the system will always be free to make them
himself, or hire any available programmer or company to make them for
him.  Users will no longer be at the mercy of one programmer or company
which owns the sources and is in sole position to make changes.

   Schools will be able to provide a much more educational environment
by encouraging all students to study and improve the system code.
Harvard's computer lab used to have the policy that no program could be
installed on the system if its sources were not on public display, and
upheld it by actually refusing to install certain programs.  I was very
much inspired by this.

   Finally, the overhead of considering who owns the system software
and what one is or is not entitled to do with it will be lifted.

   Arrangements to make people pay for using a program, including
licensing of copies, always incur a tremendous cost to society through
the cumbersome mechanisms necessary to figure out how much (that is,
which programs) a person must pay for.  And only a police state can
force everyone to obey them.  Consider a space station where air must
be manufactured at great cost: charging each breather per liter of air
may be fair, but wearing the metered gas mask all day and all night is
intolerable even if everyone can afford to pay the air bill.  And the
TV cameras everywhere to see if you ever take the mask off are
outrageous.  It's better to support the air plant with a head tax and
chuck the masks.

   Copying all or parts of a program is as natural to a programmer as
breathing, and as productive.  It ought to be as free.

Some Easily Rebutted Objections to GNU's Goals
==============================================

     "Nobody will use it if it is free, because that means they can't
     rely on any support."

     "You have to charge for the program to pay for providing the
     support."

   If people would rather pay for GNU plus service than get GNU free
without service, a company to provide just service to people who have
obtained GNU free ought to be profitable.(3)

   We must distinguish between support in the form of real programming
work and mere handholding.  The former is something one cannot rely on
from a software vendor.  If your problem is not shared by enough
people, the vendor will tell you to get lost.

   If your business needs to be able to rely on support, the only way
is to have all the necessary sources and tools.  Then you can hire any
available person to fix your problem; you are not at the mercy of any
individual.  With Unix, the price of sources puts this out of
consideration for most businesses.  With GNU this will be easy.  It is
still possible for there to be no available competent person, but this
problem cannot be blamed on distribution arrangements.  GNU does not
eliminate all the world's problems, only some of them.

   Meanwhile, the users who know nothing about computers need
handholding: doing things for them which they could easily do
themselves but don't know how.

   Such services could be provided by companies that sell just
hand-holding and repair service.  If it is true that users would rather
spend money and get a product with service, they will also be willing
to buy the service having got the product free.  The service companies
will compete in quality and price; users will not be tied to any
particular one.  Meanwhile, those of us who don't need the service
should be able to use the program without paying for the service.

     "You cannot reach many people without advertising, and you must
     charge for the program to support that."

     "It's no use advertising a program people can get free."

   There are various forms of free or very cheap publicity that can be
used to inform numbers of computer users about something like GNU.  But
it may be true that one can reach more microcomputer users with
advertising.  If this is really so, a business which advertises the
service of copying and mailing GNU for a fee ought to be successful
enough to pay for its advertising and more.  This way, only the users
who benefit from the advertising pay for it.

   On the other hand, if many people get GNU from their friends, and
such companies don't succeed, this will show that advertising was not
really necessary to spread GNU.  Why is it that free market advocates
don't want to let the free market decide this?(4)

     "My company needs a proprietary operating system to get a
     competitive edge."

   GNU will remove operating system software from the realm of
competition.  You will not be able to get an edge in this area, but
neither will your competitors be able to get an edge over you.  You and
they will compete in other areas, while benefiting mutually in this
one.  If your business is selling an operating system, you will not
like GNU, but that's tough on you.  If your business is something else,
GNU can save you from being pushed into the expensive business of
selling operating systems.

   I would like to see GNU development supported by gifts from many
manufacturers and users, reducing the cost to each.(5)

     "Don't programmers deserve a reward for their creativity?"

   If anything deserves a reward, it is social contribution.
Creativity can be a social contribution, but only in so far as society
is free to use the results.  If programmers deserve to be rewarded for
creating innovative programs, by the same token they deserve to be
punished if they restrict the use of these programs.

     "Shouldn't a programmer be able to ask for a reward for his
     creativity?"

   There is nothing wrong with wanting pay for work, or seeking to
maximize one's income, as long as one does not use means that are
destructive.  But the means customary in the field of software today
are based on destruction.

   Extracting money from users of a program by restricting their use of
it is destructive because the restrictions reduce the amount and the
ways that the program can be used.  This reduces the amount of wealth
that humanity derives from the program.  When there is a deliberate
choice to restrict, the harmful consequences are deliberate destruction.

   The reason a good citizen does not use such destructive means to
become wealthier is that, if everyone did so, we would all become
poorer from the mutual destructiveness.  This is Kantian ethics; or,
the Golden Rule.  Since I do not like the consequences that result if
everyone hoards information, I am required to consider it wrong for one
to do so.  Specifically, the desire to be rewarded for one's creativity
does not justify depriving the world in general of all or part of that
creativity.

     "Won't programmers starve?"

   I could answer that nobody is forced to be a programmer.  Most of us
cannot manage to get any money for standing on the street and making
faces.  But we are not, as a result, condemned to spend our lives
standing on the street making faces, and starving.  We do something
else.

   But that is the wrong answer because it accepts the questioner's
implicit assumption: that without ownership of software, programmers
cannot possibly be paid a cent.  Supposedly it is all or nothing.

   The real reason programmers will not starve is that it will still be
possible for them to get paid for programming; just not paid as much as
now.

   Restricting copying is not the only basis for business in software.
It is the most common basis because it brings in the most money.  If it
were prohibited, or rejected by the customer, software business would
move to other bases of organization which are now used less often.
There are always numerous ways to organize any kind of business.

   Probably programming will not be as lucrative on the new basis as it
is now.  But that is not an argument against the change.  It is not
considered an injustice that sales clerks make the salaries that they
now do.  If programmers made the same, that would not be an injustice
either.  (In practice they would still make considerably more than
that.)

     "Don't people have a right to control how their creativity is
     used?"

   "Control over the use of one's ideas" really constitutes control over
other people's lives; and it is usually used to make their lives more
difficult.

   People who have studied the issue of intellectual property rights(6)
carefully (such as lawyers) say that there is no intrinsic right to
intellectual property.  The kinds of supposed intellectual property
rights that the government recognizes were created by specific acts of
legislation for specific purposes.

   For example, the patent system was established to encourage
inventors to disclose the details of their inventions.  Its purpose was
to help society rather than to help inventors.  At the time, the life
span of 17 years for a patent was short compared with the rate of
advance of the state of the art.  Since patents are an issue only among
manufacturers, for whom the cost and effort of a license agreement are
small compared with setting up production, the patents often do not do
much harm.  They do not obstruct most individuals who use patented
products.

   The idea of copyright did not exist in ancient times, when authors
frequently copied other authors at length in works of non-fiction.  This
practice was useful, and is the only way many authors' works have
survived even in part.  The copyright system was created expressly for
the purpose of encouraging authorship.  In the domain for which it was
invented--books, which could be copied economically only on a printing
press--it did little harm, and did not obstruct most of the individuals
who read the books.

   All intellectual property rights are just licenses granted by society
because it was thought, rightly or wrongly, that society as a whole
would benefit by granting them.  But in any particular situation, we
have to ask: are we really better off granting such license?  What kind
of act are we licensing a person to do?

   The case of programs today is very different from that of books a
hundred years ago.  The fact that the easiest way to copy a program is
from one neighbor to another, the fact that a program has both source
code and object code which are distinct, and the fact that a program is
used rather than read and enjoyed, combine to create a situation in
which a person who enforces a copyright is harming society as a whole
both materially and spiritually; in which a person should not do so
regardless of whether the law enables him to.

     "Competition makes things get done better."

   The paradigm of competition is a race: by rewarding the winner, we
encourage everyone to run faster.  When capitalism really works this
way, it does a good job; but its defenders are wrong in assuming it
always works this way.  If the runners forget why the reward is offered
and become intent on winning, no matter how, they may find other
strategies--such as, attacking other runners.  If the runners get into
a fist fight, they will all finish late.

   Proprietary and secret software is the moral equivalent of runners
in a fist fight.  Sad to say, the only referee we've got does not seem
to object to fights; he just regulates them ("For every ten yards you
run, you can fire one shot").  He really ought to break them up, and
penalize runners for even trying to fight.

     "Won't everyone stop programming without a monetary incentive?"

   Actually, many people will program with absolutely no monetary
incentive.  Programming has an irresistible fascination for some
people, usually the people who are best at it.  There is no shortage of
professional musicians who keep at it even though they have no hope of
making a living that way.

   But really this question, though commonly asked, is not appropriate
to the situation.  Pay for programmers will not disappear, only become
less.  So the right question is, will anyone program with a reduced
monetary incentive?  My experience shows that they will.

   For more than ten years, many of the world's best programmers worked
at the Artificial Intelligence Lab for far less money than they could
have had anywhere else.  They got many kinds of non-monetary rewards:
fame and appreciation, for example.  And creativity is also fun, a
reward in itself.

   Then most of them left when offered a chance to do the same
interesting work for a lot of money.

   What the facts show is that people will program for reasons other
than riches; but if given a chance to make a lot of money as well, they
will come to expect and demand it.  Low-paying organizations do poorly
in competition with high-paying ones, but they do not have to do badly
if the high-paying ones are banned.

     "We need the programmers desperately.  If they demand that we stop
     helping our neighbors, we have to obey."

   You're never so desperate that you have to obey this sort of demand.
Remember: millions for defense, but not a cent for tribute!

     "Programmers need to make a living somehow."

   In the short run, this is true.  However, there are plenty of ways
that programmers could make a living without selling the right to use a
program.  This way is customary now because it brings programmers and
businessmen the most money, not because it is the only way to make a
living.  It is easy to find other ways if you want to find them.  Here
are a number of examples.

   A manufacturer introducing a new computer will pay for the porting of
operating systems onto the new hardware.

   The sale of teaching, hand-holding and maintenance services could
also employ programmers.

   People with new ideas could distribute programs as freeware(7),
asking for donations from satisfied users, or selling hand-holding
services.  I have met people who are already working this way
successfully.

   Users with related needs can form users' groups, and pay dues.  A
group would contract with programming companies to write programs that
the group's members would like to use.

   All sorts of development can be funded with a Software Tax:

     Suppose everyone who buys a computer has to pay x percent of the
     price as a software tax.  The government gives this to an agency
     like the NSF to spend on software development.

     But if the computer buyer makes a donation to software development
     himself, he can take a credit against the tax.  He can donate to
     the project of his own choosing--often, chosen because he hopes to
     use the results when it is done.  He can take a credit for any
     amount of donation up to the total tax he had to pay.

     The total tax rate could be decided by a vote of the payers of the
     tax, weighted according to the amount they will be taxed on.

     The consequences:

        * The computer-using community supports software development.

        * This community decides what level of support is needed.

        * Users who care which projects their share is spent on can
          choose this for themselves.

   In the long run, making programs free is a step toward the
post-scarcity world, where nobody will have to work very hard just to
make a living.  People will be free to devote themselves to activities
that are fun, such as programming, after spending the necessary ten
hours a week on required tasks such as legislation, family counseling,
robot repair and asteroid prospecting.  There will be no need to be
able to make a living from programming.

   We have already greatly reduced the amount of work that the whole
society must do for its actual productivity, but only a little of this
has translated itself into leisure for workers because much
nonproductive activity is required to accompany productive activity.
The main causes of this are bureaucracy and isometric struggles against
competition.  Free software will greatly reduce these drains in the
area of software production.  We must do this, in order for technical
gains in productivity to translate into less work for us.

   ---------- Footnotes ----------

   (1) The wording here was careless.  The intention was that nobody
would have to pay for _permission_ to use the GNU system.  But the
words don't make this clear, and people often interpret them as saying
that copies of GNU should always be distributed at little or no charge.
That was never the intent; later on, the manifesto mentions the
possibility of companies providing the service of distribution for a
profit.  Subsequently I have learned to distinguish carefully between
"free" in the sense of freedom and "free" in the sense of price.  Free
software is software that users have the freedom to distribute and
change.  Some users may obtain copies at no charge, while others pay to
obtain copies--and if the funds help support improving the software, so
much the better.  The important thing is that everyone who has a copy
has the freedom to cooperate with others in using it.

   (2) This is another place I failed to distinguish carefully between
the two different meanings of "free."  The statement as it stands is
not false--you can get copies of GNU software at no charge, from your
friends or over the net.  But it does suggest the wrong idea.

   (3) Several such companies now exist.

   (4) The Free Software Foundation raises most of its funds from a
distribution service, although it is a charity rather than a company.
If _no one_ chooses to obtain copies by ordering from the FSF, it will
be unable to do its work.  But this does not mean that proprietary
restrictions are justified to force every user to pay.  If a small
fraction of all the users order copies from the FSF, that is sufficient
to keep the FSF afloat.  So we ask users to choose to support us in
this way.  Have you done your part?

   (5) A group of computer companies recently pooled funds to support
maintenance of the GNU C Compiler.

   (6) In the 80s I had not yet realized how confusing it was to speak
of "the issue" of "intellectual property."  That term is obviously
biased; more subtle is the fact that it lumps together various
disparate laws which raise very different issues.  Nowadays I urge
people to reject the term "intellectual property" entirely, lest it
lead others to suppose that those laws form one coherent issue.  The
way to be clear is to discuss patents, copyrights, and trademarks
separately.  See `http://www.gnu.org/philosophy/not-ipr.xhtml' for more
explanation of how this term spreads confusion and bias.

   (7) Subsequently we have discovered the need to distinguish between
"free software" and "freeware".  The term "freeware" means software you
are free to redistribute, but usually you are not free to study and
change the source code, so most of it is not free software.  See
`http://www.gnu.org/philosophy/words-to-avoid.html' for more
explanation.


File: emacs,  Node: Glossary,  Next: Key Index,  Prev: Intro,  Up: Top

Glossary
********

Abbrev
     An abbrev is a text string that expands into a different text
     string when present in the buffer.  For example, you might define
     a few letters as an abbrev for a long phrase that you want to
     insert frequently.  *Note Abbrevs::.

Aborting
     Aborting means getting out of a recursive edit (q.v.).  The
     commands `C-]' and `M-x top-level' are used for this.  *Note
     Quitting::.

Alt
     Alt is the name of a modifier bit that a keyboard input character
     may have.  To make a character Alt, type it while holding down the
     <ALT> key.  Such characters are given names that start with `Alt-'
     (usually written `A-' for short).  (Note that many terminals have a
     key labeled <ALT> that is really a <META> key.)  *Note Alt: User
     Input.

Argument
     *Note Glossary - Numeric Argument::.

ASCII character
     An ASCII character is either an ASCII control character or an
     ASCII printing character.  *Note User Input::.

ASCII control character
     An ASCII control character is the Control version of an upper-case
     letter, or the Control version of one of the characters `@[\]^_?'.

ASCII printing character
     ASCII letters, digits, space, and the following punctuation
     characters: `!@#$%^&*()_-+=|\~`{}[]:;"'<>,.?/'.

Auto Fill Mode
     Auto Fill mode is a minor mode (q.v.) in which text that you
     insert is automatically broken into lines of a given maximum width.
     *Note Filling::.

Auto Saving
     Auto saving is the practice of periodically saving the contents of
     an Emacs buffer in a specially-named file, so that the information
     will be preserved if the buffer is lost due to a system error or
     user error.  *Note Auto Save::.

Autoloading
     Emacs can automatically load Lisp libraries when a Lisp program
     requests a function from those libraries.  This is called
     `autoloading'.  *Note Lisp Libraries::.

Backtrace
     A backtrace is a trace of a series of function calls showing how a
     program arrived at a certain point.  It is used mainly for finding
     and correcting bugs (q.v.).  Emacs can display a backtrace when it
     signals an error or when you type `C-g' (*note Glossary -
     Quitting::).  *Note Checklist::.

Backup File
     A backup file records the contents that a file had before the
     current editing session.  Emacs makes backup files automatically
     to help you track down or cancel changes you later regret making.
     *Note Backup::.

Balancing Parentheses
     Emacs can balance parentheses (or other matching delimiters) either
     manually or automatically.  You do manual balancing with the
     commands to move over parenthetical groupings (*note Moving by
     Parens::).  Automatic balancing works by blinking or highlighting
     the delimiter that matches the one you just inserted, or inserting
     the matching delimiter for you (*note Matching Parens: Matching.).

Balanced Expressions
     A balanced expression is a syntactically recognizable expression,
     such as a symbol, number, string constant, block, or parenthesized
     expression in C.  *Note Balanced Expressions: Expressions.

Balloon Help
     *Note Glossary - Tooltips::.

Base Buffer
     A base buffer is a buffer whose text is shared by an indirect
     buffer (q.v.).

Bidirectional Text
     Some human languages, such as English, are written from left to
     right.  Others, such as Arabic, are written from right to left.
     Emacs supports both of these forms, as well as any mixture of
     them--this is `bidirectional text'.  *Note Bidirectional Editing::.

Bind
     To bind a key sequence means to give it a binding (q.v.).  *Note
     Rebinding::.

Binding
     A key sequence gets its meaning in Emacs by having a binding,
     which is a command (q.v.), a Lisp function that is run when you
     type that sequence.  *Note Binding: Commands.  Customization often
     involves rebinding a character to a different command function.
     The bindings of all key sequences are recorded in the keymaps
     (q.v.).  *Note Keymaps::.

Blank Lines
     Blank lines are lines that contain only whitespace.  Emacs has
     several commands for operating on the blank lines in the buffer.
     *Note Blank Lines::.

Bookmark
     Bookmarks are akin to registers (q.v.) in that they record
     positions in buffers to which you can return later.  Unlike
     registers, bookmarks persist between Emacs sessions.  *Note
     Bookmarks::.

Border
     A border is a thin space along the edge of the frame, used just for
     spacing, not for displaying anything.  An Emacs frame has an
     ordinary external border, outside of everything including the menu
     bar, plus an internal border that surrounds the text windows,
     their scroll bars and fringes, and separates them from the menu
     bar and tool bar.  You can customize both borders with options and
     resources (*note Borders X::).  Borders are not the same as
     fringes (q.v.).

Buffer
     The buffer is the basic editing unit; one buffer corresponds to
     one text being edited.  You normally have several buffers, but at
     any time you are editing only one, the `current buffer', though
     several can be visible when you are using multiple windows or
     frames (q.v.).  Most buffers are visiting (q.v.) some file.  *Note
     Buffers::.

Buffer Selection History
     Emacs keeps a buffer selection history that records how recently
     each Emacs buffer has been selected.  This is used for choosing a
     buffer to select.  *Note Buffers::.

Bug
     A bug is an incorrect or unreasonable behavior of a program, or
     inaccurate or confusing documentation.  Emacs developers treat bug
     reports, both in Emacs code and its documentation, very seriously
     and ask you to report any bugs you find.  *Note Bugs::.

Button Down Event
     A button down event is the kind of input event (q.v.) generated
     right away when you press down on a mouse button.  *Note Mouse
     Buttons::.

By Default
     *Note Glossary - Default::.

Byte Compilation
     *Note Glossary - Compilation::.

`C-'
     `C-' in the name of a character is an abbreviation for Control.
     *Note C-: User Input.

`C-M-'
     `C-M-' in the name of a character is an abbreviation for
     Control-Meta.  If your terminal lacks a real <META> key, you type
     a Control-Meta character by typing <ESC> and then typing the
     corresponding Control character.  *Note C-M-: User Input.

Case Conversion
     Case conversion means changing text from upper case to lower case
     or vice versa.  *Note Case::.

Character
     Characters form the contents of an Emacs buffer.  Also, key
     sequences (q.v.) are usually made up of characters (though they
     may include other input events as well).  *Note User Input::.

Character Set
     Emacs supports a number of character sets, each of which
     represents a particular alphabet or script.  *Note International::.

Character Terminal
     *Note Glossary - Text Terminal::.

Click Event
     A click event is the kind of input event (q.v.) generated when you
     press a mouse button and release it without moving the mouse.
     *Note Mouse Buttons::.

Client
     *Note Glossary - Server::.

Clipboard
     A clipboard is a buffer provided by the window system for
     transferring text between applications.  On the X Window System,
     the clipboard is provided in addition to the primary selection
     (q.v.); on MS-Windows and Mac, the clipboard is used _instead_ of
     the primary selection.  *Note Clipboard::.

Coding System
     A coding system is an encoding for representing text characters in
     a file or in a stream of information.  Emacs has the ability to
     convert text to or from a variety of coding systems when reading
     or writing it.  *Note Coding Systems::.

Command
     A command is a Lisp function specially defined to be able to serve
     as a key binding in Emacs.  When you type a key sequence (q.v.),
     its binding (q.v.) is looked up in the relevant keymaps (q.v.) to
     find the command to run.  *Note Commands::.

Command History
     *Note Glossary - Minibuffer History::.

Command Name
     A command name is the name of a Lisp symbol that is a command
     (*note Commands::).  You can invoke any command by its name using
     `M-x' (*note M-x: M-x.).

Comment
     A comment is text in a program which is intended only for humans
     reading the program, and which is specially marked so that it will
     be ignored when the program is loaded or compiled.  Emacs offers
     special commands for creating, aligning and killing comments.
     *Note Comments::.

Common Lisp
     Common Lisp is a dialect of Lisp (q.v.) much larger and more
     powerful than Emacs Lisp.  Emacs provides a subset of Common Lisp
     in the CL package.  *Note Common Lisp: (cl)Top.

Compilation
     Compilation is the process of creating an executable program from
     source code.  Emacs has commands for compiling files of Emacs Lisp
     code (*note Byte Compilation: (elisp)Byte Compilation.) and
     programs in C and other languages (*note Compilation::).

Complete Key
     A complete key is a key sequence that fully specifies one action
     to be performed by Emacs.  For example, `X' and `C-f' and `C-x m'
     are complete keys.  Complete keys derive their meanings from being
     bound (q.v.) to commands (q.v.).  Thus, `X' is conventionally
     bound to a command to insert `X' in the buffer; `C-x m' is
     conventionally bound to a command to begin composing a mail
     message.  *Note Keys::.

Completion
     Completion is what Emacs does when it automatically expands an
     abbreviation for a name into the entire name.  Completion is done
     for minibuffer (q.v.) arguments when the set of possible valid
     inputs is known; for example, on command names, buffer names, and
     file names.  Completion usually occurs when <TAB>, <SPC> or <RET>
     is typed.  *Note Completion::.

Continuation Line
     When a line of text is longer than the width of the window, it
     normally (but see *note Glossary - Truncation::) takes up more
     than one screen line when displayed.  We say that the text line is
     continued, and all screen lines used for it after the first are
     called continuation lines.  *Note Continuation Lines::.  A related
     Emacs feature is `filling' (q.v.).

Control Character
     A control character is a character that you type by holding down
     the <CTRL> key.  Some control characters also have their own keys,
     so that you can type them without using <CTRL>.  For example,
     <RET>, <TAB>, <ESC> and <DEL> are all control characters.  *Note
     User Input::.

Copyleft
     A copyleft is a notice giving the public legal permission to
     redistribute and modify a program or other work of art, but
     requiring modified versions to carry similar permission.
     Copyright is normally used to keep users divided and helpless;
     with copyleft we turn that around to empower users and encourage
     them to cooperate.

     The particular form of copyleft used by the GNU project is called
     the GNU General Public License.  *Note Copying::.

<CTRL>
     The <CTRL> or "control" key is what you hold down in order to
     enter a control character (q.v.).  *Note Glossary - C-::.

Current Buffer
     The current buffer in Emacs is the Emacs buffer on which most
     editing commands operate.  You can select any Emacs buffer as the
     current one.  *Note Buffers::.

Current Line
     The current line is the line that point is on (*note Point::).

Current Paragraph
     The current paragraph is the paragraph that point is in.  If point
     is between two paragraphs, the current paragraph is the one that
     follows point.  *Note Paragraphs::.

Current Defun
     The current defun is the defun (q.v.) that point is in.  If point
     is between defuns, the current defun is the one that follows point.
     *Note Defuns::.

Cursor
     The cursor is the rectangle on the screen which indicates the
     position (called point; q.v.) at which insertion and deletion
     takes place.  The cursor is on or under the character that follows
     point.  Often people speak of `the cursor' when, strictly
     speaking, they mean `point'.  *Note Cursor: Point.

Customization
     Customization is making minor changes in the way Emacs works, to
     reflect your preferences or needs.  It is often done by setting
     variables (*note Variables::) or faces (*note Face
     Customization::), or by rebinding key sequences (*note Keymaps::).

Cut and Paste
     *Note Glossary - Killing::, and *note Glossary - Yanking::.

Daemon
     A daemon is a standard term for a system-level process that runs
     in the background.  Daemons are often started when the system
     first starts up.  When Emacs runs in daemon-mode, it runs in the
     background and does not open a display.  You can then connect to
     it with the `emacsclient' program.  *Note Emacs Server::.

Default Argument
     The default for an argument is the value that will be assumed if
     you do not specify one.  When the minibuffer is used to read an
     argument, the default argument is used if you just type <RET>.
     *Note Minibuffer::.

Default
     A default is the value that is used for a certain purpose when you
     do not explicitly specify a value to use.

Default Directory
     When you specify a file name that does not start with `/' or `~',
     it is interpreted relative to the current buffer's default
     directory.  (On MS systems, file names that start with a drive
     letter `X:' are treated as absolute, not relative.)  *Note Default
     Directory: Minibuffer File.

Defun
     A defun is a major definition at the top level in a program.  The
     name `defun' comes from Lisp, where most such definitions use the
     construct `defun'.  *Note Defuns::.

<DEL>
     <DEL> is a character that runs the command to delete one character
     of text before the cursor.  It is typically either the <DELETE>
     key or the <BACKSPACE> key, whichever one is easy to type.  *Note
     DEL: Erasing.

Deletion
     Deletion means erasing text without copying it into the kill ring
     (q.v.).  The alternative is killing (q.v.).  *Note Deletion:
     Killing.

Deletion of Files
     Deleting a file means erasing it from the file system.  (Note that
     some systems use the concept of a "trash can", or "recycle bin",
     to allow you to "undelete" files.)  *Note Misc File Ops: Misc File
     Ops.

Deletion of Messages
     Deleting a message (in Rmail, and other mail clients) means
     flagging it to be eliminated from your mail file.  Until you
     expunge (q.v.)  the Rmail file, you can still undelete the
     messages you have deleted.  *Note Rmail Deletion::.

Deletion of Windows
     Deleting a window means eliminating it from the screen.  Other
     windows expand to use up the space.  The text that was in the
     window is not lost, and you can create a new window with the same
     dimensions as the old if you wish.  *Note Windows::.

Directory
     File directories are named collections in the file system, within
     which you can place individual files or subdirectories.  They are
     sometimes referred to as "folders".  *Note Directories::.

Directory Local Variable
     A directory local variable is a local variable (q.v.) that applies
     to all the files within a certain directory.  *Note Directory
     Variables::.

Dired
     Dired is the Emacs facility that displays the contents of a file
     directory and allows you to "edit the directory", performing
     operations on the files in the directory.  *Note Dired::.

Disabled Command
     A disabled command is one that you may not run without special
     confirmation.  The usual reason for disabling a command is that it
     is confusing for beginning users.  *Note Disabling::.

Down Event
     Short for `button down event' (q.v.).

Drag Event
     A drag event is the kind of input event (q.v.) generated when you
     press a mouse button, move the mouse, and then release the button.
     *Note Mouse Buttons::.

Dribble File
     A dribble file is a file into which Emacs writes all the
     characters that you type on the keyboard.  Dribble files can be
     used to make a record for debugging Emacs bugs.  Emacs does not
     make a dribble file unless you tell it to.  *Note Bugs::.

Echo Area
     The echo area is the bottom line of the screen, used for echoing
     the arguments to commands, for asking questions, and showing brief
     messages (including error messages).  The messages are stored in
     the buffer `*Messages*' so you can review them later.  *Note Echo
     Area::.

Echoing
     Echoing is acknowledging the receipt of input events by displaying
     them (in the echo area).  Emacs never echoes single-character key
     sequences; longer key sequences echo only if you pause while typing
     them.

Electric
     We say that a character is electric if it is normally
     self-inserting (q.v.), but the current major mode (q.v.) redefines
     it to do something else as well.  For example, some programming
     language major modes define particular delimiter characters to
     reindent the line, or insert one or more newlines in addition to
     self-insertion.

End Of Line
     End of line is a character or a sequence of characters that
     indicate the end of a text line.  On GNU and Unix systems, this is
     a newline (q.v.), but other systems have other conventions.  *Note
     end-of-line: Coding Systems.  Emacs can recognize several
     end-of-line conventions in files and convert between them.

Environment Variable
     An environment variable is one of a collection of variables stored
     by the operating system, each one having a name and a value.
     Emacs can access environment variables set by its parent shell,
     and it can set variables in the environment it passes to programs
     it invokes.  *Note Environment::.

EOL
     *Note Glossary - End Of Line::.

Error
     An error occurs when an Emacs command cannot execute in the current
     circumstances.  When an error occurs, execution of the command
     stops (unless the command has been programmed to do otherwise) and
     Emacs reports the error by displaying an error message (q.v.).

Error Message
     An error message is output displayed by Emacs when you ask it to do
     something impossible (such as, killing text forward when point is
     at the end of the buffer), or when a command malfunctions in some
     way.  Such messages appear in the echo area, accompanied by a beep.

<ESC>
     <ESC> is a character used as a prefix for typing Meta characters on
     keyboards lacking a <META> key.  Unlike the <META> key (which,
     like the <SHIFT> key, is held down while another character is
     typed), you press the <ESC> key as you would press a letter key,
     and it applies to the next character you type.

Expression
     *Note Glossary - Balanced Expression::.

Expunging
     Expunging an Rmail, Gnus newsgroup, or Dired buffer is an operation
     that truly discards the messages or files you have previously
     flagged for deletion.

Face
     A face is a style of displaying characters.  It specifies
     attributes such as font family and size, foreground and background
     colors, underline and strike-through, background stipple, etc.
     Emacs provides features to associate specific faces with portions
     of buffer text, in order to display that text as specified by the
     face attributes.  *Note Faces::.

File Local Variable
     A file local variable is a local variable (q.v.) specified in a
     given file.  *Note File Variables::, and *note Glossary -
     Directory Local Variable::.

File Locking
     Emacs uses file locking to notice when two different users start
     to edit one file at the same time.  *Note Interlocking::.

File Name
     A file name is a name that refers to a file.  File names may be
     relative or absolute; the meaning of a relative file name depends
     on the current directory, but an absolute file name refers to the
     same file regardless of which directory is current.  On GNU and
     Unix systems, an absolute file name starts with a slash (the root
     directory) or with `~/' or `~USER/' (a home directory).  On
     MS-Windows/MS-DOS, an absolute file name can also start with a
     drive letter and a colon, e.g.  `D:'.

     Some people use the term "pathname" for file names, but we do not;
     we use the word "path" only in the term "search path" (q.v.).

File-Name Component
     A file-name component names a file directly within a particular
     directory.  On GNU and Unix systems, a file name is a sequence of
     file-name components, separated by slashes.  For example, `foo/bar'
     is a file name containing two components, `foo' and `bar'; it
     refers to the file named `bar' in the directory named `foo' in the
     current directory.  MS-DOS/MS-Windows file names can also use
     backslashes to separate components, as in `foo\bar'.

Fill Prefix
     The fill prefix is a string that should be expected at the
     beginning of each line when filling is done.  It is not regarded
     as part of the text to be filled.  *Note Filling::.

Filling
     Filling text means adjusting the position of line-breaks to shift
     text between consecutive lines, so that all the lines are
     approximately the same length.  *Note Filling::.  Some other
     editors call this feature "line wrapping".

Font Lock
     Font Lock is a mode that highlights parts of buffer text in
     different faces, according to the syntax.  Some other editors
     refer to this as "syntax highlighting".  For example, all comments
     (q.v.)  might be colored red.  *Note Font Lock::.

Fontset
     A fontset is a named collection of fonts.  A fontset specification
     lists character sets and which font to use to display each of
     them.  Fontsets make it easy to change several fonts at once by
     specifying the name of a fontset, rather than changing each font
     separately.  *Note Fontsets::.

Formfeed Character
     *Note Glossary - Page::.

Frame
     A frame is a rectangular cluster of Emacs windows.  Emacs starts
     out with one frame, but you can create more.  You can subdivide
     each frame into Emacs windows (q.v.).  When you are using a window
     system (q.v.), more than one frame can be visible at the same time.
     *Note Frames::.  Some other editors use the term "window" for this,
     but in Emacs a window means something else.

Free Software
     Free software is software that gives you the freedom to share,
     study and modify it.  Emacs is free software, part of the GNU
     project (q.v.), and distributed under a copyleft (q.v.) license
     called the GNU General Public License.  *Note Copying::.

Free Software Foundation
     The Free Software Foundation (FSF) is a charitable foundation
     dedicated to promoting the development of free software (q.v.).
     For more information, see the FSF website (http://fsf.org/).

Fringe
     On a graphical display (q.v.), there's a narrow portion of the
     frame (q.v.) between the text area and the window's border.  These
     "fringes" are used to display symbols that provide information
     about the buffer text (*note Fringes::).  Emacs displays the
     fringe using a special face (q.v.) called `fringe'.  *Note fringe:
     Faces.

FSF
     *Note Glossary - Free Software Foundation::.

FTP
     FTP is an acronym for File Transfer Protocol.  This is one standard
     method for retrieving remote files (q.v.).

Function Key
     A function key is a key on the keyboard that sends input but does
     not correspond to any character.  *Note Function Keys::.

Global
     Global means "independent of the current environment; in effect
     throughout Emacs".  It is the opposite of local (q.v.).  Particular
     examples of the use of `global' appear below.

Global Abbrev
     A global definition of an abbrev (q.v.) is effective in all major
     modes that do not have local (q.v.) definitions for the same
     abbrev.  *Note Abbrevs::.

Global Keymap
     The global keymap (q.v.) contains key bindings that are in effect
     everywhere, except when overridden by local key bindings in a major
     mode's local keymap (q.v.).  *Note Keymaps::.

Global Mark Ring
     The global mark ring records the series of buffers you have
     recently set a mark (q.v.) in.  In many cases you can use this to
     backtrack through buffers you have been editing, or in which you
     have found tags (*note Glossary - Tags Table::).  *Note Global
     Mark Ring::.

Global Substitution
     Global substitution means replacing each occurrence of one string
     by another string throughout a large amount of text.  *Note
     Replace::.

Global Variable
     The global value of a variable (q.v.) takes effect in all buffers
     that do not have their own local (q.v.) values for the variable.
     *Note Variables::.

GNU
     GNU is a recursive acronym for GNU's Not Unix, and it refers to a
     Unix-compatible operating system which is free software (q.v.).
     *Note Manifesto::.  GNU is normally used with Linux as the kernel
     since Linux works better than the GNU kernel.  For more
     information, see the GNU website (http://www.gnu.org/).

Graphic Character
     Graphic characters are those assigned pictorial images rather than
     just names.  All the non-Meta (q.v.) characters except for the
     Control (q.v.) characters are graphic characters.  These include
     letters, digits, punctuation, and spaces; they do not include
     <RET> or <ESC>.  In Emacs, typing a graphic character inserts that
     character (in ordinary editing modes).  *Note Inserting Text::.

Graphical Display
     A graphical display is one that can display images and multiple
     fonts.  Usually it also has a window system (q.v.).

Highlighting
     Highlighting text means displaying it with a different foreground
     and/or background color to make it stand out from the rest of the
     text in the buffer.

     Emacs uses highlighting in several ways.  It highlights the region
     whenever it is active (*note Mark::).  Incremental search also
     highlights matches (*note Incremental Search::).  *Note Glossary -
     Font Lock::.

Hardcopy
     Hardcopy means printed output.  Emacs has various commands for
     printing the contents of Emacs buffers.  *Note Printing::.

<HELP>
     <HELP> is the Emacs name for `C-h' or <F1>.  You can type <HELP>
     at any time to ask what options you have, or to ask what a command
     does.  *Note Help::.

Help Echo
     Help echo is a short message displayed in the echo area (q.v.) when
     the mouse pointer is located on portions of display that require
     some explanations.  Emacs displays help echo for menu items, parts
     of the mode line, tool-bar buttons, etc.  On graphical displays,
     the messages can be displayed as tooltips (q.v.).  *Note
     Tooltips::.

Home Directory
     Your home directory contains your personal files.  On a multi-user
     GNU or Unix system, each user has his or her own home directory.
     When you start a new login session, your home directory is the
     default directory in which to start.  A standard shorthand for
     your home directory is `~'.  Similarly, `~USER' represents the
     home directory of some other user.

Hook
     A hook is a list of functions to be called on specific occasions,
     such as saving a buffer in a file, major mode activation, etc.  By
     customizing the various hooks, you can modify Emacs's behavior
     without changing any of its code.  *Note Hooks::.

Hyper
     Hyper is the name of a modifier bit that a keyboard input
     character may have.  To make a character Hyper, type it while
     holding down the <HYPER> key.  Such characters are given names
     that start with `Hyper-' (usually written `H-' for short).  *Note
     User Input::.

Iff
     "Iff" means "if and only if".  This terminology comes from
     mathematics.  Try to avoid using this term in documentation, since
     many are unfamiliar with it and mistake it for a typo.

Inbox
     An inbox is a file in which mail is delivered by the operating
     system.  Rmail transfers mail from inboxes to Rmail files in which
     the mail is then stored permanently or until explicitly deleted.
     *Note Rmail Inbox::.

Incremental Search
     Emacs provides an incremental search facility, whereby Emacs begins
     searching for a string as soon as you type the first character.
     As you type more characters, it refines the search.  *Note
     Incremental Search::.

Indentation
     Indentation means blank space at the beginning of a line.  Most
     programming languages have conventions for using indentation to
     illuminate the structure of the program, and Emacs has special
     commands to adjust indentation.  *Note Indentation::.

Indirect Buffer
     An indirect buffer is a buffer that shares the text of another
     buffer, called its base buffer (q.v.).  *Note Indirect Buffers::.

Info
     Info is the hypertext format used by the GNU project for writing
     documentation.

Input Event
     An input event represents, within Emacs, one action taken by the
     user on the terminal.  Input events include typing characters,
     typing function keys, pressing or releasing mouse buttons, and
     switching between Emacs frames.  *Note User Input::.

Input Method
     An input method is a system for entering non-ASCII text characters
     by typing sequences of ASCII characters (q.v.).  *Note Input
     Methods::.

Insertion
     Insertion means adding text into the buffer, either from the
     keyboard or from some other place in Emacs.

Interlocking
     *Note Glossary - File Locking::.

Isearch
     *Note Glossary - Incremental Search::.

Justification
     Justification means adding extra spaces within lines of text in
     order to adjust the position of the text edges.  *Note Fill
     Commands::.

Key Binding
     *Note Glossary - Binding::.

Keyboard Macro
     Keyboard macros are a way of defining new Emacs commands from
     sequences of existing ones, with no need to write a Lisp program.
     You can use a macro to record a sequence of commands, then play
     them back as many times as you like.  *Note Keyboard Macros::.

Keyboard Shortcut
     A keyboard shortcut is a key sequence (q.v.) that invokes a
     command.  What some programs call "assigning a keyboard shortcut",
     Emacs calls "binding a key sequence".  *Note Glossary - Binding::.

Key Sequence
     A key sequence (key, for short) is a sequence of input events
     (q.v.)  that are meaningful as a single unit.  If the key sequence
     is enough to specify one action, it is a complete key (q.v.); if
     it is not enough, it is a prefix key (q.v.).  *Note Keys::.

Keymap
     The keymap is the data structure that records the bindings (q.v.)
     of key sequences to the commands that they run.  For example, the
     global keymap binds the character `C-n' to the command function
     `next-line'.  *Note Keymaps::.

Keyboard Translation Table
     The keyboard translation table is an array that translates the
     character codes that come from the terminal into the character
     codes that make up key sequences.

Kill Ring
     The kill ring is where all text you have killed (*note Glossary -
     Killing::) recently is saved.  You can reinsert any of the killed
     text still in the ring; this is called yanking (q.v.).  *Note
     Yanking::.

Killing
     Killing means erasing text and saving it on the kill ring so it
     can be yanked (q.v.) later.  Some other systems call this
     "cutting".  Most Emacs commands that erase text perform killing,
     as opposed to deletion (q.v.).  *Note Killing::.

Killing a Job
     Killing a job (such as, an invocation of Emacs) means making it
     cease to exist.  Any data within it, if not saved in a file, is
     lost.  *Note Exiting::.

Language Environment
     Your choice of language environment specifies defaults for the
     input method (q.v.) and coding system (q.v.).  *Note Language
     Environments::.  These defaults are relevant if you edit non-ASCII
     text (*note International::).

Line Wrapping
     *Note Glossary - Filling::.

Lisp
     Lisp is a programming language.  Most of Emacs is written in a
     dialect of Lisp, called Emacs Lisp, which is extended with special
     features that make it especially suitable for text editing tasks.

List
     A list is, approximately, a text string beginning with an open
     parenthesis and ending with the matching close parenthesis.  In C
     mode and other non-Lisp modes, groupings surrounded by other kinds
     of matched delimiters appropriate to the language, such as braces,
     are also considered lists.  Emacs has special commands for many
     operations on lists.  *Note Moving by Parens::.

Local
     Local means "in effect only in a particular context"; the relevant
     kind of context is a particular function execution, a particular
     buffer, or a particular major mode.  It is the opposite of `global'
     (q.v.).  Specific uses of `local' in Emacs terminology appear
     below.

Local Abbrev
     A local abbrev definition is effective only if a particular major
     mode is selected.  In that major mode, it overrides any global
     definition for the same abbrev.  *Note Abbrevs::.

Local Keymap
     A local keymap is used in a particular major mode; the key bindings
     (q.v.) in the current local keymap override global bindings of the
     same key sequences.  *Note Keymaps::.

Local Variable
     A local value of a variable (q.v.) applies to only one buffer.
     *Note Locals::.

`M-'
     `M-' in the name of a character is an abbreviation for <META>, one
     of the modifier keys that can accompany any character.  *Note M-:
     User Input.

`M-C-'
     `M-C-' in the name of a character is an abbreviation for
     Control-Meta; it means the same thing as ``C-M-'' (q.v.).

`M-x'
     `M-x' is the key sequence that is used to call an Emacs command by
     name.  This is how you run commands that are not bound to key
     sequences.  *Note M-x: M-x.

Mail
     Mail means messages sent from one user to another through the
     computer system, to be read at the recipient's convenience.  Emacs
     has commands for composing and sending mail, and for reading and
     editing the mail you have received.  *Note Sending Mail::.  *Note
     Rmail::, for one way to read mail with Emacs.

Mail Composition Method
     A mail composition method is a program runnable within Emacs for
     editing and sending a mail message.  Emacs lets you select from
     several alternative mail composition methods.  *Note Mail
     Methods::.

Major Mode
     The Emacs major modes are a mutually exclusive set of options,
     each of which configures Emacs for editing a certain sort of text.
     Ideally, each programming language has its own major mode.  *Note
     Major Modes::.

Margin
     The space between the usable part of a window (including the
     fringe) and the window edge.

Mark
     The mark points to a position in the text.  It specifies one end
     of the region (q.v.), point being the other end.  Many commands
     operate on all the text from point to the mark.  Each buffer has
     its own mark.  *Note Mark::.

Mark Ring
     The mark ring is used to hold several recent previous locations of
     the mark, in case you want to move back to them.  Each buffer has
     its own mark ring; in addition, there is a single global mark ring
     (q.v.).  *Note Mark Ring::.

Menu Bar
     The menu bar is a line at the top of an Emacs frame.  It contains
     words you can click on with the mouse to bring up menus, or you
     can use a keyboard interface to navigate it.  *Note Menu Bars::.

Message
     *Note Glossary - Mail::.

Meta
     Meta is the name of a modifier bit which you can use in a command
     character.  To enter a meta character, you hold down the <META>
     key while typing the character.  We refer to such characters with
     names that start with `Meta-' (usually written `M-' for short).
     For example, `M-<' is typed by holding down <META> and at the same
     time typing `<' (which itself is done, on most terminals, by
     holding down <SHIFT> and typing `,').  *Note Meta: User Input.

     On some terminals, the <META> key is actually labeled <ALT> or
     <EDIT>.

Meta Character
     A Meta character is one whose character code includes the Meta bit.

Minibuffer
     The minibuffer is the window that appears when necessary inside the
     echo area (q.v.), used for reading arguments to commands.  *Note
     Minibuffer::.

Minibuffer History
     The minibuffer history records the text you have specified in the
     past for minibuffer arguments, so you can conveniently use the
     same text again.  *Note Minibuffer History::.

Minor Mode
     A minor mode is an optional feature of Emacs, which can be
     switched on or off independently of all other features.  Each
     minor mode has a command to turn it on or off.  Some minor modes
     are global (q.v.), and some are local (q.v.).  *Note Minor Modes::.

Minor Mode Keymap
     A minor mode keymap is a keymap that belongs to a minor mode and is
     active when that mode is enabled.  Minor mode keymaps take
     precedence over the buffer's local keymap, just as the local
     keymap takes precedence over the global keymap.  *Note Keymaps::.

Mode Line
     The mode line is the line at the bottom of each window (q.v.),
     giving status information on the buffer displayed in that window.
     *Note Mode Line::.

Modified Buffer
     A buffer (q.v.) is modified if its text has been changed since the
     last time the buffer was saved (or since it was created, if it has
     never been saved).  *Note Saving::.

Moving Text
     Moving text means erasing it from one place and inserting it in
     another.  The usual way to move text is by killing (q.v.) it and
     then yanking (q.v.) it.  *Note Killing::.

MULE
     MULE refers to the Emacs features for editing multilingual
     non-ASCII text using multibyte characters (q.v.).  *Note
     International::.

Multibyte Character
     A multibyte character is a character that takes up several bytes
     in a buffer.  Emacs uses multibyte characters to represent
     non-ASCII text, since the number of non-ASCII characters is much
     more than 256.  *Note International Characters: International
     Chars.

Named Mark
     A named mark is a register (q.v.), in its role of recording a
     location in text so that you can move point to that location.
     *Note Registers::.

Narrowing
     Narrowing means creating a restriction (q.v.) that limits editing
     in the current buffer to only a part of the text.  Text outside
     that part is inaccessible for editing (or viewing) until the
     boundaries are widened again, but it is still there, and saving
     the file saves it all.  *Note Narrowing::.

Newline
     Control-J characters in the buffer terminate lines of text and are
     therefore also called newlines.  *Note Glossary - End Of Line::.

`nil'
     `nil' is a value usually interpreted as a logical "false".  Its
     opposite is `t', interpreted as "true".

Numeric Argument
     A numeric argument is a number, specified before a command, to
     change the effect of the command.  Often the numeric argument
     serves as a repeat count.  *Note Arguments::.

Overwrite Mode
     Overwrite mode is a minor mode.  When it is enabled, ordinary text
     characters replace the existing text after point rather than
     pushing it to one side.  *Note Minor Modes::.

Package
     A package is a collection of Lisp code that you download and
     automatically install from within Emacs.  Packages provide a
     convenient way to add new features.  *Note Packages::.

Page
     A page is a unit of text, delimited by formfeed characters (ASCII
     control-L, code 014) at the beginning of a line.  Some Emacs
     commands are provided for moving over and operating on pages.
     *Note Pages::.

Paragraph
     Paragraphs are the medium-size unit of human-language text.  There
     are special Emacs commands for moving over and operating on
     paragraphs.  *Note Paragraphs::.

Parsing
     We say that certain Emacs commands parse words or expressions in
     the text being edited.  Really, all they know how to do is find
     the other end of a word or expression.

Point
     Point is the place in the buffer at which insertion and deletion
     occur.  Point is considered to be between two characters, not at
     one character.  The terminal's cursor (q.v.) indicates the
     location of point.  *Note Point::.

Prefix Argument
     *Note Glossary - Numeric Argument::.

Prefix Key
     A prefix key is a key sequence (q.v.) whose sole function is to
     introduce a set of longer key sequences.  `C-x' is an example of
     prefix key; any two-character sequence starting with `C-x' is
     therefore a legitimate key sequence.  *Note Keys::.

Primary Selection
     The primary selection is one particular X selection (q.v.); it is
     the selection that most X applications use for transferring text
     to and from other applications.

     The Emacs kill commands set the primary selection and the yank
     command uses the primary selection when appropriate.  *Note
     Killing::.

Prompt
     A prompt is text used to ask you for input.  Displaying a prompt
     is called prompting.  Emacs prompts always appear in the echo area
     (q.v.).  One kind of prompting happens when the minibuffer is used
     to read an argument (*note Minibuffer::); the echoing that happens
     when you pause in the middle of typing a multi-character key
     sequence is also a kind of prompting (*note Echo Area::).

Query-Replace
     Query-replace is an interactive string replacement feature
     provided by Emacs.  *Note Query Replace::.

Quitting
     Quitting means canceling a partially typed command or a running
     command, using `C-g' (or `C-<BREAK>' on MS-DOS).  *Note Quitting::.

Quoting
     Quoting means depriving a character of its usual special
     significance.  The most common kind of quoting in Emacs is with
     `C-q'.  What constitutes special significance depends on the
     context and on convention.  For example, an "ordinary" character
     as an Emacs command inserts itself; so in this context, a special
     character is any character that does not normally insert itself
     (such as <DEL>, for example), and quoting it makes it insert
     itself as if it were not special.  Not all contexts allow quoting.
     *Note Quoting: Inserting Text.

Quoting File Names
     Quoting a file name turns off the special significance of
     constructs such as `$', `~' and `:'.  *Note Quoted File Names::.

Read-Only Buffer
     A read-only buffer is one whose text you are not allowed to change.
     Normally Emacs makes buffers read-only when they contain text which
     has a special significance to Emacs; for example, Dired buffers.
     Visiting a file that is write-protected also makes a read-only
     buffer.  *Note Buffers::.

Rectangle
     A rectangle consists of the text in a given range of columns on a
     given range of lines.  Normally you specify a rectangle by putting
     point at one corner and putting the mark at the diagonally
     opposite corner.  *Note Rectangles::.

Recursive Editing Level
     A recursive editing level is a state in which part of the
     execution of a command involves asking you to edit some text.
     This text may or may not be the same as the text to which the
     command was applied.  The mode line indicates recursive editing
     levels with square brackets (`[' and `]').  *Note Recursive Edit::.

Redisplay
     Redisplay is the process of correcting the image on the screen to
     correspond to changes that have been made in the text being edited.
     *Note Redisplay: Screen.

Regexp
     *Note Glossary - Regular Expression::.

Region
     The region is the text between point (q.v.) and the mark (q.v.).
     Many commands operate on the text of the region.  *Note Region:
     Mark.

Register
     Registers are named slots in which text, buffer positions, or
     rectangles can be saved for later use.  *Note Registers::.  A
     related Emacs feature is `bookmarks' (q.v.).

Regular Expression
     A regular expression is a pattern that can match various text
     strings; for example, `a[0-9]+' matches `a' followed by one or more
     digits.  *Note Regexps::.

Remote File
     A remote file is a file that is stored on a system other than your
     own.  Emacs can access files on other computers provided that they
     are connected to the same network as your machine, and (obviously)
     that you have a supported method to gain access to those files.
     *Note Remote Files::.

Repeat Count
     *Note Glossary - Numeric Argument::.

Replacement
     *Note Glossary - Global Substitution::.

Restriction
     A buffer's restriction is the amount of text, at the beginning or
     the end of the buffer, that is temporarily inaccessible.  Giving a
     buffer a nonzero amount of restriction is called narrowing (q.v.);
     removing a restriction is called widening (q.v.).  *Note
     Narrowing::.

<RET>
     <RET> is a character that in Emacs runs the command to insert a
     newline into the text.  It is also used to terminate most arguments
     read in the minibuffer (q.v.).  *Note Return: User Input.

Reverting
     Reverting means returning to the original state.  Emacs lets you
     revert a buffer by re-reading its file from disk.  *Note
     Reverting::.

Saving
     Saving a buffer means copying its text into the file that was
     visited (q.v.) in that buffer.  This is the way text in files
     actually gets changed by your Emacs editing.  *Note Saving::.

Scroll Bar
     A scroll bar is a tall thin hollow box that appears at the side of
     a window.  You can use mouse commands in the scroll bar to scroll
     the window.  The scroll bar feature is supported only under
     windowing systems.  *Note Scroll Bars::.

Scrolling
     Scrolling means shifting the text in the Emacs window so as to see
     a different part of the buffer.  *Note Scrolling::.

Searching
     Searching means moving point to the next occurrence of a specified
     string or the next match for a specified regular expression.
     *Note Search::.

Search Path
     A search path is a list of directory names, to be used for
     searching for files for certain purposes.  For example, the
     variable `load-path' holds a search path for finding Lisp library
     files.  *Note Lisp Libraries::.

Secondary Selection
     The secondary selection is one particular X selection (q.v.); some
     X applications can use it for transferring text to and from other
     applications.  Emacs has special mouse commands for transferring
     text using the secondary selection.  *Note Secondary Selection::.

Selected Frame
     The selected frame is the one your input currently operates on.
     *Note Frames::.

Selected Window
     The selected window is the one your input currently operates on.
     *Note Basic Window::.

Selecting a Buffer
     Selecting a buffer means making it the current (q.v.) buffer.
     *Note Select Buffer::.

Selection
     Windowing systems allow an application program to specify
     selections whose values are text.  A program can also read the
     selections that other programs have set up.  This is the principal
     way of transferring text between window applications.  Emacs has
     commands to work with the primary (q.v.) selection and the
     secondary (q.v.)  selection, and also with the clipboard (q.v.).

Self-Documentation
     Self-documentation is the feature of Emacs that can tell you what
     any command does, or give you a list of all commands related to a
     topic you specify.  You ask for self-documentation with the help
     character, `C-h'.  *Note Help::.

Self-Inserting Character
     A character is self-inserting if typing that character inserts that
     character in the buffer.  Ordinary printing and whitespace
     characters are self-inserting in Emacs, except in certain special
     major modes.

Sentences
     Emacs has commands for moving by or killing by sentences.  *Note
     Sentences::.

Server
     Within Emacs, you can start a `server' process, which listens for
     connections from `clients'.  This offers a faster alternative to
     starting several Emacs instances.  *Note Emacs Server::, and *note
     Glossary - Daemon::.

Sexp
     A sexp (short for "s-expression") is the basic syntactic unit of
     Lisp in its textual form: either a list, or Lisp atom.  Sexps are
     also the balanced expressions (q.v.) of the Lisp language; this is
     why the commands for editing balanced expressions have `sexp' in
     their name.  *Note Sexps: Expressions.

Simultaneous Editing
     Simultaneous editing means two users modifying the same file at
     once.  Simultaneous editing, if not detected, can cause one user
     to lose his or her work.  Emacs detects all cases of simultaneous
     editing, and warns one of the users to investigate.  *Note
     Interlocking: Interlocking.

<SPC>
     <SPC> is the space character, which you enter by pressing the
     space bar.

Speedbar
     The speedbar is a special tall frame that provides fast access to
     Emacs buffers, functions within those buffers, Info nodes, and
     other interesting parts of text within Emacs.  *Note Speedbar::.

Spell Checking
     Spell checking means checking correctness of the written form of
     each one of the words in a text.  Emacs can use various external
     spelling-checker programs to check the spelling of parts of a
     buffer via a convenient user interface.  *Note Spelling::.

String
     A string is a kind of Lisp data object that contains a sequence of
     characters.  Many Emacs variables are intended to have strings as
     values.  The Lisp syntax for a string consists of the characters
     in the string with a `"' before and another `"' after.  A `"' that
     is part of the string must be written as `\"' and a `\' that is
     part of the string must be written as `\\'.  All other characters,
     including newline, can be included just by writing them inside the
     string; however, backslash sequences as in C, such as `\n' for
     newline or `\241' using an octal character code, are allowed as
     well.

String Substitution
     *Note Glossary - Global Substitution::.

Syntax Highlighting
     *Note Glossary - Font Lock::.

Syntax Table
     The syntax table tells Emacs which characters are part of a word,
     which characters balance each other like parentheses, etc.  *Note
     Syntax Tables: (elisp)Syntax Tables.

Super
     Super is the name of a modifier bit that a keyboard input
     character may have.  To make a character Super, type it while
     holding down the <SUPER> key.  Such characters are given names
     that start with `Super-' (usually written `s-' for short).  *Note
     User Input::.

Suspending
     Suspending Emacs means stopping it temporarily and returning
     control to its parent process, which is usually a shell.  Unlike
     killing a job (q.v.), you can later resume the suspended Emacs job
     without losing your buffers, unsaved edits, undo history, etc.
     *Note Exiting::.

<TAB>
     <TAB> is the tab character.  In Emacs it is typically used for
     indentation or completion.

Tags Table
     A tags table is a file that serves as an index to the function
     definitions in one or more other files.  *Note Tags::.

Termscript File
     A termscript file contains a record of all characters sent by
     Emacs to the terminal.  It is used for tracking down bugs in Emacs
     redisplay.  Emacs does not make a termscript file unless you tell
     it to.  *Note Bugs::.

Text
     `Text' has two meanings (*note Text::):

        * Data consisting of a sequence of characters, as opposed to
          binary numbers, executable programs, and the like.  The basic
          contents of an Emacs buffer (aside from the text properties,
          q.v.) are always text in this sense.

        * Data consisting of written human language (as opposed to
          programs), or following the stylistic conventions of human
          language.

Text Terminal
     A text terminal, or character terminal, is a display that is
     limited to displaying text in character units.  Such a terminal
     cannot control individual pixels it displays.  Emacs supports a
     subset of display features on text terminals.

Text Properties
     Text properties are annotations recorded for particular characters
     in the buffer.  Images in the buffer are recorded as text
     properties; they also specify formatting information.  *Note
     Editing Format Info::.

Theme
     A theme is a set of customizations (q.v.) that give Emacs a
     particular appearance or behavior.  For example, you might use a
     theme for your favorite set of faces (q.v.).

Tool Bar
     The tool bar is a line (sometimes multiple lines) of icons at the
     top of an Emacs frame.  Clicking on one of these icons executes a
     command.  You can think of this as a graphical relative of the
     menu bar (q.v.).  *Note Tool Bars::.

Tooltips
     Tooltips are small windows displaying a help echo (q.v.) text,
     which explains parts of the display, lists useful options
     available via mouse clicks, etc.  *Note Tooltips::.

Top Level
     Top level is the normal state of Emacs, in which you are editing
     the text of the file you have visited.  You are at top level
     whenever you are not in a recursive editing level (q.v.) or the
     minibuffer (q.v.), and not in the middle of a command.  You can
     get back to top level by aborting (q.v.) and quitting (q.v.).
     *Note Quitting::.

Transposition
     Transposing two units of text means putting each one into the place
     formerly occupied by the other.  There are Emacs commands to
     transpose two adjacent characters, words, balanced expressions
     (q.v.) or lines (*note Transpose::).

Trash Can
     *Note Glossary - Deletion of Files::.

Truncation
     Truncating text lines in the display means leaving out any text on
     a line that does not fit within the right margin of the window
     displaying it.  *Note Truncation: Continuation Lines, and *note
     Glossary - Continuation Line::.

TTY
     *Note Glossary - Text Terminal::.

Undoing
     Undoing means making your previous editing go in reverse, bringing
     back the text that existed earlier in the editing session.  *Note
     Undo::.

Unix
     Unix is a class of multi-user computer operating systems with a
     long history.  There are several implementations today.  The GNU
     project (q.v.) aims to develop a complete Unix-like operating
     system that is free software (q.v.).

User Option
     A user option is a face (q.v.) or a variable (q.v.) that exists so
     that you can customize Emacs by setting it to a new value.  *Note
     Easy Customization::.

Variable
     A variable is an object in Lisp that can store an arbitrary value.
     Emacs uses some variables for internal purposes, and has others
     (known as `user options'; q.v.) just so that you can set their
     values to control the behavior of Emacs.  The variables used in
     Emacs that you are likely to be interested in are listed in the
     Variables Index in this manual (*note Variable Index::).  *Note
     Variables::, for information on variables.

Version Control
     Version control systems keep track of multiple versions of a
     source file.  They provide a more powerful alternative to keeping
     backup files (q.v.).  *Note Version Control::.

Visiting
     Visiting a file means loading its contents into a buffer (q.v.)
     where they can be edited.  *Note Visiting::.

Whitespace
     Whitespace is any run of consecutive formatting characters (space,
     tab, newline, and backspace).

Widening
     Widening is removing any restriction (q.v.) on the current buffer;
     it is the opposite of narrowing (q.v.).  *Note Narrowing::.

Window
     Emacs divides a frame (q.v.) into one or more windows, each of
     which can display the contents of one buffer (q.v.) at any time.
     *Note Screen::, for basic information on how Emacs uses the screen.
     *Note Windows::, for commands to control the use of windows.  Some
     other editors use the term "window" for what we call a `frame'
     (q.v.) in Emacs.

Window System
     A window system is software that operates on a graphical display
     (q.v.), to subdivide the screen so that multiple applications can
     have their] own windows at the same time.  All modern operating
     systems include a window system.

Word Abbrev
     *Note Glossary - Abbrev::.

Word Search
     Word search is searching for a sequence of words, considering the
     punctuation between them as insignificant.  *Note Word Search::.

Yanking
     Yanking means reinserting text previously killed (q.v.).  It can be
     used to undo a mistaken kill, or for copying or moving text.  Some
     other systems call this "pasting".  *Note Yanking::.




Local Variables:
coding: iso-8859-1
End:
